diff options
author | Max Horn | 2003-09-08 11:41:28 +0000 |
---|---|---|
committer | Max Horn | 2003-09-08 11:41:28 +0000 |
commit | 84a87ec24c3b26e4c1c0ee9c6482c0db6fbe8675 (patch) | |
tree | 556b96fdddd5a59e5093edd638bf59c7f253cde5 | |
parent | c5a3c1235c75d90c46707f819a13316948410482 (diff) | |
download | scummvm-rg350-84a87ec24c3b26e4c1c0ee9c6482c0db6fbe8675.tar.gz scummvm-rg350-84a87ec24c3b26e4c1c0ee9c6482c0db6fbe8675.tar.bz2 scummvm-rg350-84a87ec24c3b26e4c1c0ee9c6482c0db6fbe8675.zip |
fix for bug #802396 (LOOMCD: Sound often causes lock up)
svn-id: r10085
-rw-r--r-- | scumm/sound.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 6157a0ef52..c9c2bde8ed 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -1522,10 +1522,6 @@ void Sound::stopCD() { if (_dig_cd.playing) { _scumm->_mixer->stopHandle(_dig_cd.handle); _dig_cd.playing = false; - _dig_cd.track = 0; - _dig_cd.numLoops = 0; - _dig_cd.start = 0; - _dig_cd.duration = 0; } else { _scumm->_system->stop_cdrom(); } @@ -1544,8 +1540,10 @@ void Sound::updateCD() { // the CD explicitly if (_dig_cd.numLoops == -1 || --_dig_cd.numLoops > 0) playCDTrack(_dig_cd.track, _dig_cd.numLoops, _dig_cd.start, _dig_cd.duration); - else - stopCD(); + else { + _scumm->_mixer->stopHandle(_dig_cd.handle); + _dig_cd.playing = false; + } } } else { _scumm->_system->update_cdrom(); |