From 77910d416346241d9834a69b4cb0c0f0c40797b0 Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Sun, 28 May 2006 04:46:34 +0000 Subject: Fix for [ 1472007 ] KYRA1: Bypassing cutscenes with ESC doesn't stop speech svn-id: r22697 --- engines/kyra/sequences_v1.cpp | 1 + engines/kyra/sound.cpp | 4 ++++ engines/kyra/sound.h | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3