Skip to content

Commit

Permalink
[Fix] IMF: Muted channel bug detection was broken due to missing inte…
Browse files Browse the repository at this point in the history
…ger promotion. Broken since r20949.

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22223 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Nov 18, 2024
1 parent 392a683 commit baebd11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions soundlib/Load_imf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,12 @@ bool CSoundFile::ReadIMF(FileReader &file, ModLoadingFlags loadFlags)

// Read channel configuration
std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled
uint64 channelMuteStatus = 0xAAAA'AAAA << (GetNumChannels() * 2);
uint64 channelMuteStatus = static_cast<uint64>(0xAAAA'AAAA) << (GetNumChannels() * 2);
for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++)
{
ChnSettings[chn].nPan = static_cast<uint16>(fileHeader.channels[chn].panning * 256 / 255);
ChnSettings[chn].szName = mpt::String::ReadBuf(mpt::String::nullTerminated, fileHeader.channels[chn].name);
channelMuteStatus |= fileHeader.channels[chn].status << (chn * 2);
channelMuteStatus |= static_cast<uint64>(fileHeader.channels[chn].status) << (chn * 2);
// TODO: reverb/chorus?
switch(fileHeader.channels[chn].status)
{
Expand Down

0 comments on commit baebd11

Please sign in to comment.