diff options
author | Max Horn | 2004-04-10 00:17:42 +0000 |
---|---|---|
committer | Max Horn | 2004-04-10 00:17:42 +0000 |
commit | a78fb367989db4c6416070a1f35446b3b63a5db8 (patch) | |
tree | 0d607673d0c34f56c4d88e2900acdfcc143bf973 /scumm/imuse_digi | |
parent | 3b7af85adf9009e90d6de1345bad807ce579e35c (diff) | |
download | scummvm-rg350-a78fb367989db4c6416070a1f35446b3b63a5db8.tar.gz scummvm-rg350-a78fb367989db4c6416070a1f35446b3b63a5db8.tar.bz2 scummvm-rg350-a78fb367989db4c6416070a1f35446b3b63a5db8.zip |
cleanup
svn-id: r13528
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r-- | scumm/imuse_digi/dimuse.cpp | 4 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_sndmgr.cpp | 23 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_track.cpp | 3 |
3 files changed, 10 insertions, 20 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp index 19c5ce80b7..86b955cd7c 100644 --- a/scumm/imuse_digi/dimuse.cpp +++ b/scumm/imuse_digi/dimuse.cpp @@ -82,7 +82,7 @@ void IMuseDigital::callback() { if (_track[l].used) { if (_track[l].stream2) { if (!_track[l].handle.isActive() && _track[l].started) { - debug(5, "IMuseDigital::callback(): stoped sound: %d", _track[l].soundId); + debug(5, "IMuseDigital::callback() A: stopped sound: %d", _track[l].soundId); delete _track[l].stream2; _track[l].stream2 = NULL; _track[l].used = false; @@ -90,7 +90,7 @@ void IMuseDigital::callback() { } } else if (_track[l].stream) { if (_track[l].toBeRemoved) { - debug(5, "IMuseDigital::callback(): stoped sound: %d", _track[l].soundId); + debug(5, "IMuseDigital::callback() B: stopped sound: %d", _track[l].soundId); _track[l].stream->finish(); _track[l].stream = NULL; _sound->closeSound(_track[l].soundHandle); diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp index 67a12475f4..63d2d2c0f0 100644 --- a/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -341,22 +341,13 @@ ImuseDigiSndMgr::soundStruct *ImuseDigiSndMgr::openSound(int32 soundId, const ch void ImuseDigiSndMgr::closeSound(soundStruct *soundHandle) { assert(soundHandle && checkForProperHandle(soundHandle)); - for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { - if (&_sounds[l] == soundHandle) { - if (_sounds[l].bundle) - delete _sounds[l].bundle; - for (int r = 0; r < _sounds[l].numSyncs; r++) - if (_sounds[l].sync[r].ptr) - free(_sounds[l].sync[r].ptr); - if (_sounds[l].region) - free(_sounds[l].region); - if (_sounds[l].jump) - free(_sounds[l].jump); - if (_sounds[l].sync) - free(_sounds[l].sync); - memset(&_sounds[l], 0, sizeof(soundStruct)); - } - } + delete soundHandle->bundle; + for (int r = 0; r < soundHandle->numSyncs; r++) + free(soundHandle->sync[r].ptr); + free(soundHandle->region); + free(soundHandle->jump); + free(soundHandle->sync); + memset(soundHandle, 0, sizeof(soundStruct)); } bool ImuseDigiSndMgr::checkForProperHandle(soundStruct *soundHandle) { diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp index 3541de5ddf..be15e46fa9 100644 --- a/scumm/imuse_digi/dimuse_track.cpp +++ b/scumm/imuse_digi/dimuse_track.cpp @@ -165,8 +165,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, } } - warning("it should not happen"); - assert(0); + error("IMuseDigital::startSound(): We should never get here"); } void IMuseDigital::setPriority(int soundId, int priority) { |