aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorJonathan Gray2003-01-20 05:59:25 +0000
committerJonathan Gray2003-01-20 05:59:25 +0000
commit846d73c53686da151a83f310096421aa23676e74 (patch)
tree60f9f3df7f6903b090fb67e1e7459be8beda704e /scumm/sound.cpp
parent26fa144a9df5439f584dcc88586043f4fe310b22 (diff)
downloadscummvm-rg350-846d73c53686da151a83f310096421aa23676e74.tar.gz
scummvm-rg350-846d73c53686da151a83f310096421aa23676e74.tar.bz2
scummvm-rg350-846d73c53686da151a83f310096421aa23676e74.zip
patch #670660 by Daniel Schepler, properly handle disc switching wrt voice file in comi
svn-id: r6522
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 618c1651d0..bc72f183a5 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1140,7 +1140,12 @@ int Sound::playBundleSound(char *sound) {
if (_scumm->_gameId == GID_CMI) {
char voxfile[20];
sprintf(voxfile, "voxdisk%d.bun", _scumm->_vars[_scumm->VAR_CURRENTDISK]);
+ if (_voiceDisk != _scumm->_vars[_scumm->VAR_CURRENTDISK])
+ _scumm->_bundle->_voiceFile.close();
+
result = _scumm->_bundle->openVoiceFile(voxfile, _scumm->getGameDataPath());
+
+ _voiceDisk = (byte)_scumm->_vars[_scumm->VAR_CURRENTDISK];
} else if (_scumm->_gameId == GID_DIG)
result = _scumm->_bundle->openVoiceFile("digvoice.bun", _scumm->getGameDataPath());
else