diff options
author | Max Horn | 2008-01-05 23:53:28 +0000 |
---|---|---|
committer | Max Horn | 2008-01-05 23:53:28 +0000 |
commit | 1d34ce3baa6e7c2a3b77308082057409994b5a50 (patch) | |
tree | e58bf3ec4ea8eab81ba2e7312c0e984fa462d585 /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | ef9dac103f5610dd89d01cf52342d1325481e8ff (diff) | |
download | scummvm-rg350-1d34ce3baa6e7c2a3b77308082057409994b5a50.tar.gz scummvm-rg350-1d34ce3baa6e7c2a3b77308082057409994b5a50.tar.bz2 scummvm-rg350-1d34ce3baa6e7c2a3b77308082057409994b5a50.zip |
Let the audio mixer take care of (i.e. dispose) the Track::stream object, too
svn-id: r30277
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index bc71e71b10..3da2a5b56c 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -63,9 +63,7 @@ int IMuseDigital::allocSlot(int priority) { // Stop the track immediately _mixer->stopHandle(track->mixChanHandle); - if (!track->souStreamUsed) { - assert(track->stream); - delete track->stream; + if (!track->soundDesc) { _sound->closeSound(track->soundDesc); } @@ -156,7 +154,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, #endif track->stream = Audio::makeAppendableAudioStream(freq, makeMixerFlags(track->mixerFlags)); - _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), false); + _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan()); } track->used = true; @@ -317,7 +315,7 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDel // Create an appendable output buffer fadeTrack->stream = Audio::makeAppendableAudioStream(_sound->getFreq(fadeTrack->soundDesc), makeMixerFlags(fadeTrack->mixerFlags)); - _mixer->playInputStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan(), false); + _mixer->playInputStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan()); fadeTrack->used = true; return fadeTrack; |