Fixed KyraEngine_v1::snd_stopVoice and KyraEngine_v1::snd_voiceIsPlaying implementations.
svn-id: r32330
This commit is contained in:
parent
c0f1b7fe66
commit
691306f0b7
2 changed files with 6 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue