Fixed KyraEngine_v1::snd_stopVoice and KyraEngine_v1::snd_voiceIsPlaying implementations.

svn-id: r32330
This commit is contained in:
Johannes Schickel 2008-05-27 21:04:27 +00:00
parent c0f1b7fe66
commit 691306f0b7
2 changed files with 6 additions and 3 deletions

View file

@ -760,7 +760,7 @@ int KyraEngine_HoF::o2_showItemString(EMCState *script) {
int KyraEngine_HoF::o2_isAnySoundPlaying(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_isAnySoundPlaying(%p) ()", (const void *)script);
return _sound->voiceIsPlaying();
return _sound->voiceIsPlaying() ? 1 : 0;
}
int KyraEngine_HoF::o2_setDrawNoShapeFlag(EMCState *script) {

View file

@ -538,12 +538,15 @@ void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) {
void KyraEngine_v1::snd_stopVoice() {
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()");
_sound->voiceStop(_speechFile.empty() ? 0 : _speechFile.c_str());
if (!_speechFile.empty()) {
_sound->voiceStop(_speechFile.c_str());
_speechFile.clear();
}
}
bool KyraEngine_v1::snd_voiceIsPlaying() {
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()");
return _sound->voiceIsPlaying(_speechFile.empty() ? 0 : _speechFile.c_str());
return _speechFile.empty() ? false : _sound->voiceIsPlaying(_speechFile.c_str());
}
// static res