[Scummvm-cvs-logs] SF.net SVN: scummvm:[50405] scummvm/trunk/engines/sci/sound
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sun Jun 27 23:41:30 CEST 2010
Revision: 50405
http://scummvm.svn.sourceforge.net/scummvm/?rev=50405&view=rev
Author: m_kiewitz
Date: 2010-06-27 21:41:30 +0000 (Sun, 27 Jun 2010)
Log Message:
-----------
SCI: tell midiparser that he lost ownership of channels in case we take them away
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
scummvm/trunk/engines/sci/sound/midiparser_sci.h
scummvm/trunk/engines/sci/sound/music.cpp
Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-27 21:38:45 UTC (rev 50404)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp 2010-06-27 21:41:30 UTC (rev 50405)
@@ -648,6 +648,12 @@
}
}
+void MidiParser_SCI::lostChannels() {
+ for (int curChannel = 0; curChannel < 15; curChannel++)
+ if ((_channelUsed[curChannel]) && (curChannel != 9))
+ _channelRemap[curChannel] = -1;
+}
+
void MidiParser_SCI::setVolume(byte volume) {
// FIXME: This receives values > 127... throw a warning for now and clip the variable
if (volume > MUSIC_VOLUME_MAX) {
Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.h
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.h 2010-06-27 21:38:45 UTC (rev 50404)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.h 2010-06-27 21:41:30 UTC (rev 50405)
@@ -81,6 +81,7 @@
const byte *getMixedData() const { return _mixedData; }
void tryToOwnChannels();
+ void lostChannels();
void sendFromScriptToDriver(uint32 midi);
void sendToDriver(uint32 midi);
void sendToDriver(byte status, byte firstOp, byte secondOp) {
Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp 2010-06-27 21:38:45 UTC (rev 50404)
+++ scummvm/trunk/engines/sci/sound/music.cpp 2010-06-27 21:41:30 UTC (rev 50405)
@@ -287,6 +287,8 @@
if (_usedChannel[i] == caller)
_usedChannel[i] = 0;
}
+ // Also tell midiparser, that he lost ownership
+ caller->pMidiParser->lostChannels();
}
void SciMusic::soundPlay(MusicEntry *pSnd) {
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