You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found some issues with looping ambient audio tracks when music_mute_menu is enabled in tombati. When you leave the game paused long enough, you'll notice that the next iteration of the track is unmuted. When that iteration finishes, the track stops for good, even when you unpause the game. I traced the problem to this code in musicPlay:
// this one will always be set back to true on the next tick
*m_tombCDLoop = FALSE;
// Calculate volume from current volume setting. The original code used
// the hardcoded value 0x400400, which equals a volume of 25%.
uint32_t volume = *m_tombCDVolume * 0xffff / 10;
volume |= volume << 16;
auxSetVolume(*m_tombAuxDeviceID, volume);
When the game is paused, m_tombCDLoop is never set back to true, which is why the track eventually stops. Setting the volume unmutes the track.
When I take this code out the problem is fixed, and no new issues seem to arise, i.e. no tracks loop that aren't supposed to, and the volume setting is still maintained. I'm using the WinMM wrapper with FLAC audio tracks you posted on tombraiderforums.
The text was updated successfully, but these errors were encountered:
I found some issues with looping ambient audio tracks when music_mute_menu is enabled in tombati. When you leave the game paused long enough, you'll notice that the next iteration of the track is unmuted. When that iteration finishes, the track stops for good, even when you unpause the game. I traced the problem to this code in musicPlay:
When the game is paused, m_tombCDLoop is never set back to true, which is why the track eventually stops. Setting the volume unmutes the track.
When I take this code out the problem is fixed, and no new issues seem to arise, i.e. no tracks loop that aren't supposed to, and the volume setting is still maintained. I'm using the WinMM wrapper with FLAC audio tracks you posted on tombraiderforums.
The text was updated successfully, but these errors were encountered: