From 2e65c05991cf1f4ff04ad08613f6bec28ee5216f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 2 Aug 2008 14:35:43 +0000 Subject: Add warning when a voc file is not found. svn-id: r33524 --- engines/kyra/sound.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index c8749dc06b..ffe0cbf666 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -104,6 +104,11 @@ int32 Sound::voicePlay(const char *file, bool isSfx) { fileSize = 0; } + if (!audioStream) { + warning("Couldn't load sound file '%s'", file); + return 0; + } + _soundChannels[h].file = file; _mixer->playInputStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, audioStream); -- cgit v1.2.3