[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.48,1.49
Travis Howell
kirben at users.sourceforge.net
Thu Oct 23 17:27:14 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv9821/simon
Modified Files:
sound.cpp
Log Message:
Don't attempt to play sound in simon2mac if file doesn't exist.
Add fixme for simon2mac, freeing voice at this point which causes crashes.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- sound.cpp 10 Oct 2003 13:55:07 -0000 1.48
+++ sound.cpp 23 Oct 2003 04:49:04 -0000 1.49
@@ -355,7 +355,7 @@
free(filename2);
if (file->isOpen() == false) {
if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
- warning("readSfxFile: Can't load sfx file %s", filename);
+ warning("readSfxFile: Can't load sfx file %s", filename);
return;
}
}
@@ -390,7 +390,6 @@
file->open(filename2, gameDataPath);
free(filename2);
if (file->isOpen() == false) {
- if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
warning("readVoiceFile: Can't load voice file %s", filename);
return;
}
@@ -409,11 +408,13 @@
File *file = new File();
file->open(filename, _gameDataPath);
if (file->isOpen() == false) {
- warning("Can't open voice file %s", filename);
- } else {
- delete _voice;
- _voice = new WavSound(_mixer, file, _offsets);
- }
+ warning("playVoice: Can't load voice file %s", filename);
+ return;
+ }
+ // FIXME freeing voice at this point causes frequent game crashes
+ // Maybe related to sound effects and speech using same sound format ?
+ // delete _voice;
+ _voice = new WavSound(_mixer, file, _offsets);
}
if (!_voice)
More information about the Scummvm-git-logs
mailing list