[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.33,1.34
Travis Howell
kirben at users.sourceforge.net
Thu Jul 24 09:56:34 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv13220/simon
Modified Files:
sound.cpp
Log Message:
Should be right now
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- sound.cpp 24 Jul 2003 14:21:56 -0000 1.33
+++ sound.cpp 24 Jul 2003 16:54:40 -0000 1.34
@@ -387,9 +387,7 @@
}
}
- if (_effects)
- delete _effects;
-
+ delete _effects;
if (_game == GAME_SIMON1CD32) {
_effects = new VocSound(_mixer, file, 0, SOUND_BIG_ENDIAN);
} else
@@ -425,14 +423,14 @@
}
}
- if (_voice)
- delete _voice;
-
+ delete _voice;
_voice = new RawSound(_mixer, file, 0, SOUND_BIG_ENDIAN);
}
void SimonSound::playVoice(uint sound) {
if (_game == GAME_SIMON2MAC && _filenums) {
+ stopAll();
+
char filename[16];
sprintf(filename, "voices%d.dat", _filenums[sound]);
File *file = new File();
@@ -440,9 +438,7 @@
if (file->isOpen() == false) {
warning("Can't open voice file %s", filename);
} else {
- if (_voice)
- delete _voice;
-
+ delete _voice;
_voice = new WavSound(_mixer, file, _offsets);
}
}
More information about the Scummvm-git-logs
mailing list