| Summary: | mikmod broken volume and loop support | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | raptor85 |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | radiantstatue |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
patch to fix volume and looping issues in SDL_mixer mikmod suppport
fixed version of patch without wrap turned on |
||
Does it enable loop support, or does it actually make all mod music loop by default? Created attachment 915 [details]
fixed version of patch without wrap turned on
the "loop" setting for mikmod enabled in-module looping, not looping the entire mod, with it set to 0 mikmod will ignore any segement loops which causes most songs to play improperly.
I just uploaded a new patch though, i noticed i accidently left "wrap" turned on after you mentioned that, "wrap" is the setting that tells the mod file to play forever in mikmod so you probably don't want that patched in on your version.
I tested the patch, and it works well for me. As raptor85 mentioned, wrap is the flag that tells mikmod to loop forever. The loop flag is for in-module loops, which should play how they are meant to, even if they play endlessly regardless of the loop parameter in SDL_PlayMusic. In that case, the user should manually stop the song when he wants to. Fixed, thanks! https://hg.libsdl.org/SDL_mixer/rev/4359e193d93f |
Created attachment 914 [details] patch to fix volume and looping issues in SDL_mixer mikmod suppport When playing .mod or .it files using SDL_mixer's mikmod support looping and initial volume are ignored, making music play improperly and making volume reset to max every time the song loops. This makes Mix_VolumeMusic work differently for mikmod than any other music support as it doesn't persist volume through the loop. Attached is a quick patch I made that fixes both issues for me by enabling loop support and setting the initial volume when starting play.