From: <sv...@op...> - 2024-11-18 21:27:25
|
Author: sagamusix Date: Mon Nov 18 22:27:12 2024 New Revision: 22229 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22229 Log: [Fix] IMF: It was still possible that we were shifting by 64 bits. Modified: trunk/OpenMPT/soundlib/Load_imf.cpp Modified: trunk/OpenMPT/soundlib/Load_imf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_imf.cpp Mon Nov 18 21:27:01 2024 (r22228) +++ trunk/OpenMPT/soundlib/Load_imf.cpp Mon Nov 18 22:27:12 2024 (r22229) @@ -437,7 +437,7 @@ // Read channel configuration std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled - uint64 channelMuteStatus = static_cast<uint64>(0xAAAA'AAAA) << (GetNumChannels() * 2); + uint64 channelMuteStatus = 0; for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = static_cast<uint16>(fileHeader.channels[chn].panning * 256 / 255); @@ -459,7 +459,7 @@ } // BEHIND.IMF: All channels but the first are muted // mikmod refers to this as an Orpheus bug, but I haven't seen any other files like this, so maybe it's just an incorrectly saved file? - if(channelMuteStatus == 0xAAAA'AAAA'5555'5554) + if(GetNumChannels() == 16 && channelMuteStatus == 0x5555'5554) { for(CHANNELINDEX chn = 1; chn < GetNumChannels(); chn++) ChnSettings[chn].dwFlags.reset(CHN_MUTE); |