aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-08-02 14:35:43 +0000
committerJohannes Schickel2008-08-02 14:35:43 +0000
commit2e65c05991cf1f4ff04ad08613f6bec28ee5216f (patch)
tree782f393b37975a5cc4ba54a27de69485450e7fbe
parentb58beb242f36f31a25f8cf1b3117cf85d39eb9ee (diff)
downloadscummvm-rg350-2e65c05991cf1f4ff04ad08613f6bec28ee5216f.tar.gz
scummvm-rg350-2e65c05991cf1f4ff04ad08613f6bec28ee5216f.tar.bz2
scummvm-rg350-2e65c05991cf1f4ff04ad08613f6bec28ee5216f.zip
Add warning when a voc file is not found.
svn-id: r33524
-rw-r--r--engines/kyra/sound.cpp5
1 files changed, 5 insertions, 0 deletions
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);