Hello everyone. The OldUnreal team maintains various audio drivers for Unreal 1 and Unreal Tournament 99, including one based on FMOD, another based on OpenAL Soft + XMP, and one based on Carlo Vogelsang’s Galaxy Music system. The latter came with the original games. We recently noticed a discrepancy in how these three backends handle state retention when a tracker music sample loops automatically (i.e., without a manual loop command).
Galaxy resets all channel and global state when a track loops. This state includes the volume and playback speed.
XMP seems to retain at least some of the state, but added automatic volume reset in versions 4.4.0 and 4.4.1.
FMOD also retains state and does not seem to have an option to reset it.
This is a problem for us since some of the games’ original tracks end with a volume fadeout sequence. When FMOD plays these tracks with looping enabled, they sound fine on the first loop, but are completely silent from the second loop onwards (except for the fadeout sequence at the end).
A good example is the track shown in this screenshot. I can mail this file directly to whoever wishes to look into this, but cannot upload it to a public folder because it is copyrighted.
Pattern 92 gradually reduces the global volume from 0x40 to 0x00. Pattern 93 briefly resets the global volume to 0x40 and then back to 0x00. The pattern then ends without any manual loop commands so FMOD jumps back to the initial pattern in the sequence. The volume control sequence in pattern 93 might seem odd, but we have actually found several tracks with a similar sequence, including some that came with the game.
To play this track with FMOD, we were forced to load them with FMOD_LOOP_OFF | FMOD_ACCURATETIME, and we have to restart it manually when it ends without a manual loop command.
Is there a way to automatically reset all relevant state when a track loops? If not, could such an option be added?
Thanks!