diff options
author | Einar Johan Trøan Sømåen | 2012-06-14 22:51:53 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-14 22:51:53 +0200 |
commit | 181414d749080b0c10c441ace945c3965f43fa39 (patch) | |
tree | f4610aeb83b3c9913457d1af455b2ac4f0743fa1 | |
parent | f7888fea6ee8d55778e792fbb4d04f0b3acf6885 (diff) | |
download | scummvm-rg350-181414d749080b0c10c441ace945c3965f43fa39.tar.gz scummvm-rg350-181414d749080b0c10c441ace945c3965f43fa39.tar.bz2 scummvm-rg350-181414d749080b0c10c441ace945c3965f43fa39.zip |
WINTERMUTE: Warn about WAVE-files for now.
-rw-r--r-- | engines/wintermute/Base/BSoundBuffer.cpp | 12 |
1 files 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;
}
|