aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/kyra_v2.cpp3
-rw-r--r--engines/kyra/sound_adlib.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 2052c34002..42209d34c3 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -1734,10 +1734,13 @@ void KyraEngine_v2::snd_playVoiceFile(int id) {
assert(id >= 0 && id <= 9999999);
sprintf(vocFile, "%07d", id);
if (_sound->voiceFileIsPresent(vocFile)) {
+ snd_stopVoice();
+
while (!_sound->voicePlay(vocFile)) {
updateWithText();
_system->delayMillis(10);
}
+
_speechFile = vocFile;
}
}
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 2f90017ccb..df37c75426 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -2229,8 +2229,8 @@ SoundAdlibPC::SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer)
}
SoundAdlibPC::~SoundAdlibPC() {
- delete [] _soundDataPtr;
delete _driver;
+ delete [] _soundDataPtr;
}
bool SoundAdlibPC::init() {