[Scummvm-cvs-logs] scummvm master -> 2d3ad096ab92a6ddcd2b14436937649bbabcd12f

bluegr md5 at scummvm.org
Fri May 13 20:12:13 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2d3ad096ab SWORD25: Fix compilation when libvorbis is not present


Commit: 2d3ad096ab92a6ddcd2b14436937649bbabcd12f
    https://github.com/scummvm/scummvm/commit/2d3ad096ab92a6ddcd2b14436937649bbabcd12f
Author: md5 (md5 at scummvm.org)
Date: 2011-05-13T11:09:31-07:00

Commit Message:
SWORD25: Fix compilation when libvorbis is not present

Changed paths:
    audio/decoders/vorbis.h
    engines/sword25/sfx/soundengine.cpp



diff --git a/audio/decoders/vorbis.h b/audio/decoders/vorbis.h
index f7dcad3..e3d989e 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 377b7f3..20622b2 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;
 }






More information about the Scummvm-git-logs mailing list