- 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
This commit is contained in:
Johannes Schickel 2008-03-26 21:39:44 +00:00
parent e962640411
commit f919b26875
2 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -2229,8 +2229,8 @@ SoundAdlibPC::SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer)
}
SoundAdlibPC::~SoundAdlibPC() {
delete [] _soundDataPtr;
delete _driver;
delete [] _soundDataPtr;
}
bool SoundAdlibPC::init() {