[Scummvm-cvs-logs] SF.net SVN: scummvm:[51715] scummvm/trunk/engines/sci/sound

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Aug 3 23:38:26 CEST 2010


Revision: 51715
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51715&view=rev
Author:   m_kiewitz
Date:     2010-08-03 21:38:26 +0000 (Tue, 03 Aug 2010)

Log Message:
-----------
SCI: not error()ing out on no free channels

instead we just ignore such channels. I'm not sure how sierra sci behaved in that case, they ignored channels as well, but maybe they removed them from earlier music

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
    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-08-03 20:46:28 UTC (rev 51714)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-08-03 21:38:26 UTC (rev 51715)
@@ -425,7 +425,8 @@
 
 	// Channel remapping
 	int16 realChannel = _channelRemap[midiChannel];
-	assert(realChannel != -1);
+	if (realChannel == -1)
+		return;
 
 	midi = (midi & 0xFFFFFFF0) | realChannel;
 	if (_mainThreadCalled)

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-08-03 20:46:28 UTC (rev 51714)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-08-03 21:38:26 UTC (rev 51715)
@@ -293,7 +293,10 @@
 			return channelNr;
 		}
 	}
-	error("no free channels");
+	// nothing found, don't map channel at all
+	//  sierra did this as well, although i'm not sure if we act exactly the same way
+	//  maybe they removed channels from previous playing music
+	return -1;
 }
 
 void SciMusic::freeChannels(MusicEntry *caller) {


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