aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/midiparser_sci.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2015-02-14 15:58:47 +0100
committerWillem Jan Palenstijn2015-02-15 14:05:56 +0100
commit1c5722f014d1f5a34c79d8d1cb7f5ed86e0b822d (patch)
tree5db2827defb37659356dab6ef88a5a8b7a80ae07 /engines/sci/sound/midiparser_sci.cpp
parent5028487038fd3572d68af3cd253fc28917245e63 (diff)
downloadscummvm-rg350-1c5722f014d1f5a34c79d8d1cb7f5ed86e0b822d.tar.gz
scummvm-rg350-1c5722f014d1f5a34c79d8d1cb7f5ed86e0b822d.tar.bz2
scummvm-rg350-1c5722f014d1f5a34c79d8d1cb7f5ed86e0b822d.zip
SCI: Allow channel remapping from audio thread too
Diffstat (limited to 'engines/sci/sound/midiparser_sci.cpp')
-rw-r--r--engines/sci/sound/midiparser_sci.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 7ebe47633a..25facacced 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -487,8 +487,11 @@ void MidiParser_SCI::trackState(uint32 b) {
s._sustain = (op2 != 0);
break;
case 0x4B: // voices
- if (s._voices != op2)
- warning("Voice change (%d to %d) without remapping", s._voices, op2);
+ if (s._voices != op2) {
+ // CHECKME: Should we directly call remapChannels() if _mainThreadCalled?
+ debugC(2, kDebugLevelSound, "Dynamic voice change (%d to %d)", s._voices, op2);
+ _music->needsRemap();
+ }
s._voices = op2;
_pSnd->_chan[channel]._voices = op2; // Also sync our MusicEntry
break;
@@ -500,8 +503,9 @@ void MidiParser_SCI::trackState(uint32 b) {
bool m = op2;
if (_pSnd->_chan[channel]._mute != m) {
_pSnd->_chan[channel]._mute = m;
- // TODO: If muting/unmuting a channel, remap channels.
- warning("Mute change without immediate remapping (mainThread = %d)", _mainThreadCalled);
+ // CHECKME: Should we directly call remapChannels() if _mainThreadCalled?
+ _music->needsRemap();
+ debugC(2, kDebugLevelSound, "Dynamic mute change (mainThread = %d)", _mainThreadCalled);
}
}
break;