aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOystein Eftevaag2006-05-28 04:46:34 +0000
committerOystein Eftevaag2006-05-28 04:46:34 +0000
commit77910d416346241d9834a69b4cb0c0f0c40797b0 (patch)
treeb6a1ee455d4865f7f485e53c8388d0474f9ea4e8
parent9a7f92d55821e3d10b2304090c6eda8927fc0fbd (diff)
downloadscummvm-rg350-77910d416346241d9834a69b4cb0c0f0c40797b0.tar.gz
scummvm-rg350-77910d416346241d9834a69b4cb0c0f0c40797b0.tar.bz2
scummvm-rg350-77910d416346241d9834a69b4cb0c0f0c40797b0.zip
Fix for [ 1472007 ] KYRA1: Bypassing cutscenes with ESC doesn't stop speech
svn-id: r22697
-rw-r--r--engines/kyra/sequences_v1.cpp1
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound.h3
3 files changed, 7 insertions, 1 deletions
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index 158d3b4c73..b0e143a2a7 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -118,6 +118,7 @@ void KyraEngine::seq_intro() {
delay(30 * _tickLength);
_seq->setCopyViewOffs(false);
_sound->haltTrack();
+ _sound->voiceStop();
if (_features & GF_TALKIE) {
_res->unloadPakFile("INTRO.VRM");
}
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 4a0fab6367..50cfa05b62 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -81,6 +81,10 @@ void Sound::voicePlay(const char *file) {
fileSize = 0;
}
+void Sound::voiceStop() {
+ _mixer->stopHandle(_vocHandle);
+}
+
bool Sound::voiceIsPlaying() {
return _mixer->isSoundHandleActive(_vocHandle);
}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index e43239efc1..3252bee6d8 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -64,7 +64,8 @@ public:
void voicePlay(const char *file);
void voiceUnload() {}
bool voiceIsPlaying();
-
+ void voiceStop();
+
protected:
KyraEngine *_engine;
Audio::Mixer *_mixer;