Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module files can not loop correctly. #202

Open
Kashouryo opened this issue Jul 13, 2018 · 5 comments
Open

Module files can not loop correctly. #202

Kashouryo opened this issue Jul 13, 2018 · 5 comments

Comments

@Kashouryo
Copy link

It looks like there's a small gap between loops in MKXP's module music player(xm, mod, etc.). This small gap of silence breaks almost all of the perfect loop modules(one of the features of module music is being able to endlessly loop a tune). Normally, Position Jump can solve this issue. However, MKXP is also ignoring Position Jump command.
I hope this issue can be solved since one of the biggest purposes to use module music is being able to endless loop a tune.

Thank you!

@carstene1ns
Copy link
Contributor

Hi, mkxp delegates the music playback to SDL_sound, which then uses the appropriate library to do the actual decoding (i.e. ModPlug). That being said, these libraries would likely need to be patched to provide seamless loops.

(We have a similar problem at EasyRPG/Player project, MIDI files with custom loop events, so we need to look for and respect custom loop commands there)

Can you provide some example files (or link a game)?

@Kashouryo
Copy link
Author

Short and good for perfectly loop testing: http://modarchive.org/index.php?request=view_by_moduleid&query=158605
Problem with position jump command: http://modarchive.org/index.php?request=view_by_moduleid&query=159847

@Ancurio
Copy link
Owner

Ancurio commented Jul 14, 2018

This may be a bit more complicated. Setting this value to -1 should loop BGMs perfectly, from what I gathered by googling. The problem is that all decoding options for modplug, including looping, appear to be global for every mod loaded.

So if one wanted to use mods for both sound effects and BGMs, this would lead to a conflict. Also I don't know if this setting belongs in SDL_sound, or if it justifies a mkxp-internal ALDataSource implementation talking directly to modplug.

@Kashouryo
Copy link
Author

Kashouryo commented Jul 14, 2018

can we register a custom value on the RGSS system to switch between the traditional mode and perfect looping mode? Or using mkxp.conf?

@Ancurio
Copy link
Owner

Ancurio commented Jul 15, 2018

Ideally perfect loop should be the default and only looping mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants