[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.h,1.138,1.139 scummvm.cpp,2.44,2.45 sound.cpp,1.74,1.75

James Brown ender at users.sourceforge.net
Thu Jan 23 22:42:01 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv22891/scumm

Modified Files:
	scumm.h scummvm.cpp sound.cpp 
Log Message:
LCA'03 commit: Fix talking where no sound hardware is present


Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- scumm.h	19 Jan 2003 03:25:59 -0000	1.138
+++ scumm.h	24 Jan 2003 06:41:10 -0000	1.139
@@ -852,7 +852,7 @@
 	uint16 _defaultTalkDelay;
 	bool _use_adlib;
 	int tempMusic;
-	bool _silentDigitalImuse;
+	bool _silentDigitalImuse, _noDigitalSamples;
 	int _saveSound;
 	int current_cd_sound;
 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.44
retrieving revision 2.45
diff -u -d -r2.44 -r2.45
--- scummvm.cpp	17 Jan 2003 07:20:54 -0000	2.44
+++ scummvm.cpp	24 Jan 2003 06:41:10 -0000	2.45
@@ -156,6 +156,7 @@
 			warning("Adlib music was selected, switching to midi null driver");   
 		}   
 		_silentDigitalImuse = true;
+		_noDigitalSamples = true;
 	} 
 	_mixer->setVolume(kDefaultSFXVolume * kDefaultMasterVolume / 255);
 	_mixer->setMusicVolume(kDefaultMusicVolume);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- sound.cpp	20 Jan 2003 05:59:25 -0000	1.74
+++ sound.cpp	24 Jan 2003 06:41:10 -0000	1.75
@@ -416,8 +416,8 @@
 
 	if (_scumm->_vars[_scumm->VAR_TALK_ACTOR]) { //_sfxMode & 2) {
 		act = _scumm->_vars[_scumm->VAR_TALK_ACTOR];
-		if (_talkChannel < 0)
-			finished = false;
+		if (_talkChannel < 1)
+			finished = true;
 		else if (_scumm->_mixer->_channels[_talkChannel] == NULL) {
 			finished = true;
 		} else
@@ -772,6 +772,9 @@
 	int rate, comp;
 	byte *data;
 
+	if (_scumm->_noDigitalSamples)
+		return -1;
+
 	if (file_size > 0) {
 		int alloc_size = file_size;
 #ifdef USE_MAD
@@ -1136,7 +1139,10 @@
 int Sound::playBundleSound(char *sound) {
 	byte * ptr;
 	bool result;
-	
+
+	if (_scumm->_noDigitalSamples)
+		return -1;	
+
 	if (_scumm->_gameId == GID_CMI) {
 		char voxfile[20];
 		sprintf(voxfile, "voxdisk%d.bun", _scumm->_vars[_scumm->VAR_CURRENTDISK]);
@@ -1238,7 +1244,7 @@
 
 int Sound::playSfxSound_MP3(void *sound, uint32 size) {
 #ifdef USE_MAD
-	if (_soundsPaused)
+	if (_soundsPaused || _scumm->_noDigitalSamples)
 		return -1;
 	return _scumm->_mixer->playMP3(NULL, sound, size, SoundMixer::FLAG_AUTOFREE);
 #endif
@@ -1309,7 +1315,7 @@
 
 int Sound::playSfxSound_Vorbis(void *sound, uint32 size) {
 #ifdef USE_VORBIS
-	if (_soundsPaused)
+	if (_soundsPaused || _scumm->_noDigitalSamples)
 		return -1;
 
 	OggVorbis_File *ov_file = new OggVorbis_File;





More information about the Scummvm-git-logs mailing list