mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
SWORD25: Fix compilation when libvorbis is not present
(cherry picked from commit 2d3ad096ab
)
This commit is contained in:
parent
92d0216db1
commit
5838ef6719
@ -36,6 +36,7 @@
|
||||
* - scumm
|
||||
* - sword1
|
||||
* - sword2
|
||||
* - sword25
|
||||
* - touche
|
||||
* - tucker
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user