Open zeesworth opened 1 month ago
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 program I'm building uses the data from an external source, which uses MOD files to store some audio.
I had neglected to test any of those original MOD files with playmus
, and had only tested my example MOD, which was made in a newer software and had different handling.
The looping issue with my example file was in fact an external bug, but it wasn't the issue I thought it was.
However, I cannot test any of the original files in playmus
, since it doesn't seem to want to play it. It always outputs Unrecognized audio format
and quits
Here is the file I'm trying to play: BIZARRETUNE.MOD.zip I can verify this file loops correctly in libxmp, but I haven't been able to test with libmodplug for the above reason
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. I remember I had gotten it to work once in a different library using libmodplug by changing something, I'll have to look and see what exactly I changed
Looping in libmodplug can be fixed by uncommenting these lines in libmodplug/src/sndmix.cpp
// 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