diff options
author | md5 | 2011-05-13 21:09:31 +0300 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-05-21 18:03:47 +0200 |
commit | 5838ef6719f5658dfcb381fbec1ddb7625db58cc (patch) | |
tree | f86b946a0b61bdb4e6397c9a768e292450196733 /engines/sword25 | |
parent | 92d0216db18c96c97bb4b57ada76cf532838cf5b (diff) | |
download | scummvm-rg350-5838ef6719f5658dfcb381fbec1ddb7625db58cc.tar.gz scummvm-rg350-5838ef6719f5658dfcb381fbec1ddb7625db58cc.tar.bz2 scummvm-rg350-5838ef6719f5658dfcb381fbec1ddb7625db58cc.zip |
SWORD25: Fix compilation when libvorbis is not present
(cherry picked from commit 2d3ad096ab92a6ddcd2b14436937649bbabcd12f)
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/sfx/soundengine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp index 08f0f5b4ae..80bc5bce3b 100644 --- a/engines/sword25/sfx/soundengine.cpp +++ b/engines/sword25/sfx/soundengine.cpp @@ -154,13 +154,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; } |