[Scummvm-cvs-logs] CVS: scummvm/sword2/driver d_sound.cpp,1.163,1.164

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Dec 21 02:58:02 CET 2005


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28581/driver

Modified Files:
	d_sound.cpp 
Log Message:
Added debugging messages to track which CD (1 or 2) the game thinks it's
supposed to be reading data from. Maybe this will help track down the
mysterious missing speech problem reported on the forum.


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- d_sound.cpp	11 Dec 2005 08:30:48 -0000	1.163
+++ d_sound.cpp	21 Dec 2005 10:57:48 -0000	1.164
@@ -43,6 +43,8 @@
 static AudioStream *makeCLUStream(Common::File *fp, int size);
 
 static AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, int cd, uint32 id, uint32 *numSamples) {
+	debug(3, "Playing %s from CD %d", base, cd);
+
 	if (!fh->file.isOpen()) {
 		struct {
 			const char *ext;
@@ -453,7 +455,7 @@
 
 	for (i = 0; i < MAXMUS; i++) {
 		if (_music[i]) {
-			if (_music[i]->whichCd() == 1)
+			if (_music[i]->getCD() == 1)
 				inUse[0] = true;
 			else
 				inUse[1] = true;
@@ -532,7 +534,7 @@
 	//Common::StackLock lock(_mutex);
 
 	_mutex.lock();
-	int cd = _vm->_resman->whichCd();
+	int cd = _vm->_resman->getCD();
 
 	if (loop)
 		_loopingMusicId = musicId;
@@ -708,7 +710,7 @@
  */
 
 uint32 Sound::preFetchCompSpeech(uint32 speechId, uint16 **buf) {
-	int cd = _vm->_resman->whichCd();
+	int cd = _vm->_resman->getCD();
 	uint32 numSamples;
 
 	SoundFileHandle *fh = (cd == 1) ? &_speechFile[0] : &_speechFile[1];
@@ -754,7 +756,7 @@
 	if (getSpeechStatus() == RDERR_SPEECHPLAYING)
 		return RDERR_SPEECHPLAYING;
 
-	int cd = _vm->_resman->whichCd();
+	int cd = _vm->_resman->getCD();
 	SoundFileHandle *fh = (cd == 1) ? &_speechFile[0] : &_speechFile[1];
 
 	AudioStream *input = getAudioStream(fh, "speech", cd, speechId, NULL);





More information about the Scummvm-git-logs mailing list