diff options
author | Johannes Schickel | 2008-03-26 21:39:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-26 21:39:44 +0000 |
commit | f919b26875033c41186b840b97752c72cab68f7f (patch) | |
tree | 4495938d24ad19d15a739c1bbb36f49a964b1537 | |
parent | e96264041186f3118ae3715f59fdcc85ff8f5507 (diff) | |
download | scummvm-rg350-f919b26875033c41186b840b97752c72cab68f7f.tar.gz scummvm-rg350-f919b26875033c41186b840b97752c72cab68f7f.tar.bz2 scummvm-rg350-f919b26875033c41186b840b97752c72cab68f7f.zip |
- fixed multiple voices playing at once (see bug #1926547 "HoF: Right mouse button messes up gameplay").
- fixed crash while uninitializing AdLib driver
svn-id: r31252
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 3 | ||||
-rw-r--r-- | engines/kyra/sound_adlib.cpp | 2 |
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() { |