-
Notifications
You must be signed in to change notification settings - Fork 26
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
MOD music playing through libmodplug doesn't respect restart position #87
Comments
Let me check this, sounds like more like a bug, or setup confusion. Did you set the "loop infinite"? |
Yes, the output in both my program, and the playmus example with the loop argument set, play identically |
I checked just now, looks like both libXMP and libModPlug has this bug. A good reason to report this problem to https://github.com/libxmp/libxmp |
I'll report it there too, after getting libxmp compiled on my machine so I can test and verify |
Boy do I feel like a dummy. The looping issue with my example file was in fact an external bug, but it wasn't the issue I thought it was. Here is the file I'm trying to play: BIZARRETUNE.MOD.zip |
Tested it just now, and it got been misdetected as an IdSoftware IMF file (a stream of raw OPL2 commands), that's another bug. |
Fixed that detection quickly on MixerX side. |
I've had a chance to test this and the file does get loaded now, and I'm happy to report this song loops correctly with libxmp! However it does not loop correctly with libmodplug, that still needs to be figured out. |
Looping in libmodplug can be fixed by uncommenting these lines in // End of song ?
if ((m_nPattern == 0xFF) || (m_nCurrentPattern >= MAX_ORDERS))
{
- //if (!m_nRepeatCount)
+ if (!m_nRepeatCount)
return FALSE; //never repeat entire song
if (!m_nRestartPos)
{
m_nMusicSpeed = m_nDefaultSpeed;
m_nMusicTempo = m_nDefaultTempo; }
}
}
- //if (m_nRepeatCount > 0) m_nRepeatCount--;
+ if (m_nRepeatCount > 0) m_nRepeatCount--;
m_nCurrentPattern = m_nRestartPos;
m_nRow = 0; |
Interesting, I should apply this at the copy of libModPlug at the AudioCodecs side (the collection of dependencies for MixerX). |
Hi, I'm starting to use this library for one of my projects,
I'm noticing that whenever i load a .MOD file as Music with the ModPlug library enabled, the module's Restart Position does not get respected (haven't tested with XMP)
I've attached an example MOD file that shows what I mean, the file should loop back to the point where the screaming starts.
However playing this with the
playmus
example, it loops back to the beginning of the file after pausing for a moment.TEST.MOD.zip
The text was updated successfully, but these errors were encountered: