aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/sound
diff options
context:
space:
mode:
authorJenniBee2018-05-16 00:36:21 -0400
committerAdrian Frühwirth2018-05-17 18:08:18 +0000
commit5090b6cbbbbabad7443ee653cabd38594c3186ca (patch)
tree3ec1a23fdac32ef3f397ed6f8034fc7da97e4b9d /engines/wintermute/base/sound
parentfa6a9280b215bef7ad36fcaffef02a267be5be2f (diff)
downloadscummvm-rg350-5090b6cbbbbabad7443ee653cabd38594c3186ca.tar.gz
scummvm-rg350-5090b6cbbbbabad7443ee653cabd38594c3186ca.tar.bz2
scummvm-rg350-5090b6cbbbbabad7443ee653cabd38594c3186ca.zip
WINTERMUTE: Add flag for games using low-spec resources.
Diffstat (limited to 'engines/wintermute/base/sound')
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp
index 5fdac12cef..adcdd828a1 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.cpp
+++ b/engines/wintermute/base/sound/base_sound_buffer.cpp
@@ -33,7 +33,9 @@
#include "engines/wintermute/wintermute.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
+#ifdef USE_VORBIS
#include "audio/decoders/vorbis.h"
+#endif
#include "audio/decoders/wave.h"
#include "audio/decoders/raw.h"
#include "common/system.h"
@@ -102,9 +104,12 @@ bool BaseSoundBuffer::loadFromFile(const Common::String &filename, bool forceRel
}
Common::String strFilename(filename);
strFilename.toLowercase();
- if (strFilename.hasSuffix(".ogg")) {
- _stream = Audio::makeVorbisStream(_file, DisposeAfterUse::YES);
- } else if (strFilename.hasSuffix(".wav")) {
+ #ifdef USE_VORBIS
+ if (strFilename.hasSuffix(".ogg")) {
+ _stream = Audio::makeVorbisStream(_file, DisposeAfterUse::YES);
+ }
+ #endif
+ if (strFilename.hasSuffix(".wav")) {
int waveSize, waveRate;
byte waveFlags;
uint16 waveType;