diff options
author | Martin Kiewitz | 2010-06-25 16:43:09 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-25 16:43:09 +0000 |
commit | b188fc14a2591e480c0fb4a16558ef0a2aacd3a3 (patch) | |
tree | da9945746428c835cccbe226b7bd5f9604a22fbb /engines/sci/sound | |
parent | 6ee82a20276d213a06d43ff731d197f5a92a09d7 (diff) | |
download | scummvm-rg350-b188fc14a2591e480c0fb4a16558ef0a2aacd3a3.tar.gz scummvm-rg350-b188fc14a2591e480c0fb4a16558ef0a2aacd3a3.tar.bz2 scummvm-rg350-b188fc14a2591e480c0fb4a16558ef0a2aacd3a3.zip |
SCI: only send new volume to currently mapped channels, fixes assert in sq1 because setVolume is called on an object that's currently not playing. added fixme
svn-id: r50274
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 4766118f52..cb43f6c3a1 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -672,9 +672,11 @@ void MidiParser_SCI::setVolume(byte volume) { case SCI_VERSION_1_EARLY: case SCI_VERSION_1_LATE: - // sending volume change to all used channels + // sending volume change to all currently mapped channels + // FIXME?: maybe we should better store new volume if music isn't playing currently and adjust volume + // when playing for (int i = 0; i < 15; i++) - if (_channelUsed[i]) + if (_channelRemap[i] != -1) sendToDriver(0xB0 + i, 7, _volume); break; |