aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-02-21 15:07:05 +0000
committerTorbjörn Andersson2009-02-21 15:07:05 +0000
commit6e2848ff9825125f43c67a59ad4c922398d9255c (patch)
tree77d98638d2a90088c30844850ca3fba7e3f7fcb4 /engines/sword2/sound.cpp
parent34f90ac043230f049c58aaaf843ac347e0fc5c21 (diff)
downloadscummvm-rg350-6e2848ff9825125f43c67a59ad4c922398d9255c.tar.gz
scummvm-rg350-6e2848ff9825125f43c67a59ad4c922398d9255c.tar.bz2
scummvm-rg350-6e2848ff9825125f43c67a59ad4c922398d9255c.zip
Rewrote the cutscene player to be more like the one in Broken Sword 1. This fixes
a subtitle colour regression, but mainly it simplifies the code. The "dummy" player has been removed. There are almost certainly regressions, but I'm hoping it's stable enough for testing now. svn-id: r38697
Diffstat (limited to 'engines/sword2/sound.cpp')
-rw-r--r--engines/sword2/sound.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 6af94c9cb6..ee9fa1debf 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -217,6 +217,15 @@ void Sound::playMovieSound(int32 res, int type) {
_vm->_sound->playFx(handle, data, len, Audio::Mixer::kMaxChannelVolume, 0, false, Audio::Mixer::kMusicSoundType);
}
+void Sound::stopMovieSounds() {
+ if (_vm->_mixer->isSoundHandleActive(_leadInHandle)) {
+ _vm->_mixer->stopHandle(_leadInHandle);
+ }
+ if (_vm->_mixer->isSoundHandleActive(_leadOutHandle)) {
+ _vm->_mixer->stopHandle(_leadOutHandle);
+ }
+}
+
/**
* Queue a sound effect for playing later.
* @param res the sound resource number