diff options
author | Max Horn | 2003-09-10 22:36:46 +0000 |
---|---|---|
committer | Max Horn | 2003-09-10 22:36:46 +0000 |
commit | ba34c1f4cf2c6a20d067020390e4949b2d71df35 (patch) | |
tree | 73b2b5e6d136185a90fe1877c1c4ead32f5570dd | |
parent | faf32582410a13e51b66cedba340e0b52df089b3 (diff) | |
download | scummvm-rg350-ba34c1f4cf2c6a20d067020390e4949b2d71df35.tar.gz scummvm-rg350-ba34c1f4cf2c6a20d067020390e4949b2d71df35.tar.bz2 scummvm-rg350-ba34c1f4cf2c6a20d067020390e4949b2d71df35.zip |
experimental fix for bug #802396 (LOOMCD: Sound lock up); it turns out this is a very long standing bug (pre-0.4.1 at the least). This fix may cause regressions in games using CD tracks, beware
svn-id: r10163
-rw-r--r-- | scumm/sound.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index d970ad5b04..91f929909f 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -742,6 +742,7 @@ void Sound::stopSound(int a) { if (a != 0 && a == _currentCDSound) { _currentCDSound = 0; stopCD(); + stopCDTimer(); } if (_scumm->_features & GF_FMTOWNS) { @@ -759,6 +760,7 @@ void Sound::stopAllSounds() { if (_currentCDSound != 0) { _currentCDSound = 0; stopCD(); + stopCDTimer(); } // Clear the (secondary) sound queue @@ -1491,7 +1493,7 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) { _dig_cd.numLoops = numLoops; _dig_cd.start = startFrame; _dig_cd.duration = duration; - _track_info[index]->play(_scumm->_mixer, &_dig_cd.handle, startFrame, duration); + _track_info[index]->play(_scumm->_mixer, &_dig_cd.handle, _dig_cd.start, _dig_cd.duration); } else { _scumm->_system->play_cdrom(track, numLoops, startFrame, duration); } @@ -1504,7 +1506,6 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) { } void Sound::stopCD() { - stopCDTimer(); if (_dig_cd.playing) { _scumm->_mixer->stopHandle(_dig_cd.handle); |