diff options
author | Paweł Kołodziejski | 2004-01-08 17:07:21 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-01-08 17:07:21 +0000 |
commit | 6d8c2d0461181521174a9b553136f6518ba08bb6 (patch) | |
tree | 420dc090165e2042e5424b1295ed307ae3d858fb /scumm | |
parent | 370589dde52b4419e7d1412e9b5cc74a331f980d (diff) | |
download | scummvm-rg350-6d8c2d0461181521174a9b553136f6518ba08bb6.tar.gz scummvm-rg350-6d8c2d0461181521174a9b553136f6518ba08bb6.tar.bz2 scummvm-rg350-6d8c2d0461181521174a9b553136f6518ba08bb6.zip |
synced with local sources
svn-id: r12257
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_digi/dimuse.cpp | 18 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse.h | 5 | ||||
-rw-r--r-- | scumm/resource.cpp | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp index 2253cf3624..c0784485e4 100644 --- a/scumm/imuse_digi/dimuse.cpp +++ b/scumm/imuse_digi/dimuse.cpp @@ -208,6 +208,7 @@ void IMuseDigital::switchToNextRegion(int track) { int region = checkJumpByRegion(track, _track[track].curRegion); if (region != -1) _track[track].curRegion = region; + _track[track].curHookId = 0; } _track[track].regionOffset = 0; @@ -320,7 +321,7 @@ void IMuseDigital::stopSound(int soundId) { } } -void IMuseDigital::stopAllSounds() { +void IMuseDigital::stopAllSounds(bool waitForStop) { debug(5, "IMuseDigital::stopAllSounds"); for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { if (_track[l].used) { @@ -331,6 +332,17 @@ void IMuseDigital::stopAllSounds() { } } _curMusicId = -1; + + if (waitForStop) { + bool used; + do { + used = false; + for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { + if (_track[l].used) + used = true; + } + } while (used); + } } void IMuseDigital::pause(bool p) { @@ -564,10 +576,6 @@ int IMuseDigital::getSoundStatus(int sound) const { return 0; } -void IMuseDigital::closeBundleFiles() { - // TODO -} - int32 IMuseDigital::getPosInMs(int soundId) { for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { if ((_track[l].idSound == soundId) && _track[l].used) { diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h index e8b5dd8cbe..c21e04d470 100644 --- a/scumm/imuse_digi/dimuse.h +++ b/scumm/imuse_digi/dimuse.h @@ -101,7 +101,8 @@ public: void setMasterVolume(int vol) {} void stopMusic(); void stopSound(int soundId); - void stopAllSounds(); + void stopAllSounds(bool waitForStop); + void stopAllSounds() { stopAllSounds(false); } void pause(bool pause); void parseScriptCmds(int a, int b, int c, int d, int e, int f, int g, int h); int getSoundStatus(int sound) const; @@ -111,8 +112,6 @@ public: int32 getCurVoiceLipSyncHeight(); int32 getCurMusicLipSyncWidth(int32 param); int32 getCurMusicLipSyncHeight(int32 param); - - void closeBundleFiles(); }; struct imuse_music_table { diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 1c178807ff..1ae8167456 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -227,7 +227,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) { if (_version == 8) { char result; - _imuseDigital->closeBundleFiles(); + _imuseDigital->stopAllSounds(true); #ifdef MACOSX sprintf(buf, "Cannot find file: '%s'\nPlease insert disc %d.\nHit OK to retry, Cancel to exit", filename, disknum); |