diff options
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/script_hof.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sound.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index ef50cc8dfd..91fbfb3e49 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -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) { diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index f8e2e1f1e0..8f9077705e 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -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 |