[Scummvm-cvs-logs] SF.net SVN: scummvm:[50413] scummvm/trunk/engines/sci/sound/midiparser_sci. cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon Jun 28 10:25:45 CEST 2010
Revision: 50413
http://scummvm.svn.sourceforge.net/scummvm/?rev=50413&view=rev
Author: m_kiewitz
Date: 2010-06-28 08:25:45 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
SCI: regression from implementing channel remapping and r50405 - center pitch wheels and hold pedal on init instead of unloadMusic(), fixes lsl5 piano scene
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-28 08:18:55 UTC (rev 50412)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-28 08:25:45 UTC (rev 50413)
@@ -127,6 +127,14 @@
if (_channelUsed[i])
sendToDriver(0xB0 | i, 0x4E, 0); // Reset velocity
}
+
+ // Center the pitch wheels and hold pedal in preparation for the next piece of music
+ for (int i = 0; i < 16; ++i) {
+ if (_channelUsed[i]) {
+ sendToDriver(0xE0 | i, 0, 0x40); // Reset pitch wheel
+ sendToDriver(0xB0 | i, 0x40, 0); // Reset hold pedal
+ }
+ }
}
void MidiParser_SCI::unloadMusic() {
@@ -142,17 +150,6 @@
delete[] _mixedData;
_mixedData = NULL;
}
-
- // Center the pitch wheels and hold pedal in preparation for the next piece of music
- if (_driver && _pSnd) {
- for (int i = 0; i < 16; ++i) {
- int16 realChannel = _channelRemap[i];
- if (realChannel != -1) {
- _driver->send(0xE0 | realChannel, 0, 0x40); // Reset pitch wheel
- _driver->send(0xB0 | realChannel, 0x40, 0); // Reset hold pedal
- }
- }
- }
}
// this is used for scripts sending midi commands to us. we verify in that case that the channel is actually
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list