aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-05-27 11:26:37 +0000
committerMartin Kiewitz2010-05-27 11:26:37 +0000
commitcfed70df07781327effb6c5eb3d87b29ef0f34da (patch)
tree0bd7b2b6b29d530a69c02691399bbe9f39e30a8d /engines/sci
parente5eaf3ee5578367cc74c3155a68a904e6ce77b9b (diff)
downloadscummvm-rg350-cfed70df07781327effb6c5eb3d87b29ef0f34da.tar.gz
scummvm-rg350-cfed70df07781327effb6c5eb3d87b29ef0f34da.tar.bz2
scummvm-rg350-cfed70df07781327effb6c5eb3d87b29ef0f34da.zip
SCI: fixing resuming samples - fixes hang when ship is flying away happening when you entered menu during that sequence
svn-id: r49261
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sound/music.cpp7
-rw-r--r--engines/sci/sound/soundcmd.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index a623c0b4d2..2b203af93e 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -387,7 +387,12 @@ void SciMusic::soundResume(MusicEntry *pSnd) {
return;
if (pSnd->status != kSoundPaused)
return;
- soundPlay(pSnd);
+ if (pSnd->pStreamAud) {
+ _pMixer->pauseHandle(pSnd->hCurrentAud, false);
+ pSnd->status = kSoundPlaying;
+ } else {
+ soundPlay(pSnd);
+ }
}
void SciMusic::soundToggle(MusicEntry *pSnd, bool pause) {
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 40e3637372..45d9302354 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -828,7 +828,7 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) {
musicSlot->loop -= currentLoopCounter - musicSlot->sampleLoopCounter;
musicSlot->sampleLoopCounter = currentLoopCounter;
}
- if (!_music->soundIsActive(musicSlot)) {
+ if ((!_music->soundIsActive(musicSlot)) && (musicSlot->status != kSoundPaused)) {
processStopSound(obj, 0, true);
} else {
_music->updateAudioStreamTicker(musicSlot);