From 181414d749080b0c10c441ace945c3965f43fa39 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Thu, 14 Jun 2012 22:51:53 +0200 Subject: WINTERMUTE: Warn about WAVE-files for now. --- engines/wintermute/Base/BSoundBuffer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engines/wintermute/Base/BSoundBuffer.cpp b/engines/wintermute/Base/BSoundBuffer.cpp index 052dbf98d5..c658cf5b31 100644 --- a/engines/wintermute/Base/BSoundBuffer.cpp +++ b/engines/wintermute/Base/BSoundBuffer.cpp @@ -36,6 +36,7 @@ #include "audio/audiostream.h" #include "audio/mixer.h" #include "audio/decoders/vorbis.h" +#include "audio/decoders/wave.h" #include "common/system.h" namespace WinterMute { @@ -110,8 +111,15 @@ HRESULT CBSoundBuffer::LoadFromFile(const char *Filename, bool ForceReload) { Game->LOG(0, "Error opening sound file '%s'", Filename); return E_FAIL; } - - _stream = Audio::makeVorbisStream(_file, DisposeAfterUse::NO); + Common::String strFilename(Filename); + if (strFilename.hasSuffix(".ogg")) { + _stream = Audio::makeVorbisStream(_file, DisposeAfterUse::NO); + } else if (strFilename.hasSuffix(".wav")) { + warning("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s", Filename); + //_stream = Audio::makeWAVStream(_file, DisposeAfterUse::NO); + } else { + warning("BSoundBuffer::LoadFromFile - Unknown filetype for %s", Filename); + } if (!_stream) { return E_FAIL; } -- cgit v1.2.3