From 4dc368460874c1028f5cc7b105365b1060ec6d15 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 15 Nov 2005 12:03:38 +0000 Subject: Speech support for FF. svn-id: r19600 --- simon/sound.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simon/sound.cpp b/simon/sound.cpp index fd6c5e1840..160a1a125f 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -82,6 +82,10 @@ BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigendia else size = _file->readUint32LE(); + // The Feeble Files uses set amount of voice offsets + if (size == 0) + size = 40000; + res = size / sizeof(uint32); _offsets = (uint32 *)malloc(size + sizeof(uint32)); @@ -447,7 +451,11 @@ void Sound::playVoice(uint sound) { return; _mixer->stopHandle(_voiceHandle); - _voice->playSound(sound, &_voiceHandle, (_vm->getGameId() == GID_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED); + if (_vm->getGameType() == GType_FF || _vm->getGameId() == GID_SIMON1CD32) { + _voice->playSound(sound, &_voiceHandle, 0); + } else { + _voice->playSound(sound, &_voiceHandle, Audio::Mixer::FLAG_UNSIGNED); + } } void Sound::playSoundData(byte *soundData, uint sound, uint pan, uint vol, bool ambient) { -- cgit v1.2.3