aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormd52011-05-13 21:09:31 +0300
committermd52011-05-13 21:09:31 +0300
commit2d3ad096ab92a6ddcd2b14436937649bbabcd12f (patch)
tree854b35fac7f826d19b0246e745b30a6b0d1ddbfa
parentef96967285cd71e8554b3e9391b32347d5f8350f (diff)
downloadscummvm-rg350-2d3ad096ab92a6ddcd2b14436937649bbabcd12f.tar.gz
scummvm-rg350-2d3ad096ab92a6ddcd2b14436937649bbabcd12f.tar.bz2
scummvm-rg350-2d3ad096ab92a6ddcd2b14436937649bbabcd12f.zip
SWORD25: Fix compilation when libvorbis is not present
-rw-r--r--audio/decoders/vorbis.h1
-rw-r--r--engines/sword25/sfx/soundengine.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/audio/decoders/vorbis.h b/audio/decoders/vorbis.h
index f7dcad3a12..e3d989e9b8 100644
--- a/audio/decoders/vorbis.h
+++ b/audio/decoders/vorbis.h
@@ -33,6 +33,7 @@
* - scumm
* - sword1
* - sword2
+ * - sword25
* - touche
* - tucker
*/
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 377b7f3023..20622b2098 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -151,13 +151,17 @@ bool SoundEngine::playSound(const Common::String &fileName, SOUND_TYPES type, fl
uint SoundEngine::playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume, float pan, bool loop, int loopStart, int loopEnd, uint layer) {
Common::SeekableReadStream *in = Kernel::getInstance()->getPackage()->getStream(fileName);
+#ifdef USE_VORBIS
Audio::SeekableAudioStream *stream = Audio::makeVorbisStream(in, DisposeAfterUse::YES);
+#endif
uint id;
SndHandle *handle = getHandle(&id);
debugC(1, kDebugSound, "SoundEngine::playSoundEx(%s, %d, %f, %f, %d, %d, %d, %d)", fileName.c_str(), type, volume, pan, loop, loopStart, loopEnd, layer);
+#ifdef USE_VORBIS
_mixer->playStream(getType(type), &(handle->handle), stream, -1, (byte)(volume * 255), (int8)(pan * 127));
+#endif
return id;
}