aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorTravis Howell2003-11-18 05:14:18 +0000
committerTravis Howell2003-11-18 05:14:18 +0000
commitc90d4c4e08e8946589c84a1281ca582e84946f8f (patch)
tree9fe601bcf0734c085867186cfa3b4c1d0ee5afe5 /scumm/sound.cpp
parent5589cdc10cc4389ea010b1362f51b6b907bc9ded (diff)
downloadscummvm-rg350-c90d4c4e08e8946589c84a1281ca582e84946f8f.tar.gz
scummvm-rg350-c90d4c4e08e8946589c84a1281ca582e84946f8f.tar.bz2
scummvm-rg350-c90d4c4e08e8946589c84a1281ca582e84946f8f.zip
Alter old demo check
Stop crash on exit with comi demo svn-id: r11341
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 7f486ee209..6e63cb17c1 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1242,10 +1242,10 @@ void Sound::playBundleSound(char *sound, PlayingSoundHandle *handle) {
return;
if (_scumm->_gameId == GID_CMI) {
- char voxfile[20];
if (_scumm->_features & GF_DEMO) {
result = _bundle->openVoiceFile("voice.bun", _scumm->getGameDataPath());
} else {
+ char voxfile[20];
sprintf(voxfile, "voxdisk%d.bun", _scumm->VAR(_scumm->VAR_CURRENTDISK));
if (_voiceDisk != _scumm->VAR(_scumm->VAR_CURRENTDISK))
_bundle->closeVoiceFile();
@@ -1270,7 +1270,7 @@ void Sound::playBundleSound(char *sound, PlayingSoundHandle *handle) {
if (_scumm->_gameId == GID_CMI) {
char name[20];
strcpy(name, sound);
- if (_scumm->_maxRooms != 6) // CMI demo does not have .IMX for voice but does for music...
+ if (!(_scumm->_features & GF_DEMO)) // CMI demo does not have .IMX for voice but does for music...
strcat(name, ".IMX");
output_size = _bundle->decompressVoiceSampleByName(name, &ptr);
} else {