From b8aca5c202012dd6121598f06aca6715cbd365ca Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 28 Mar 2014 22:00:12 +0200 Subject: SCI: Add missing USE_MAD check for commit 6a519f7f This fixes compilation for platforms where libmad isn't present --- engines/sci/sound/audio.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines') diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 228abba51e..8e35d6b055 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -79,6 +79,7 @@ void AudioPlayer::handleFanmadeSciAudio(reg_t sciAudioObject, SegManager *segMan Common::String command = segMan->getString(commandReg); if (command == "play" || command == "playx") { +#ifdef USE_MAD reg_t fileNameReg = readSelector(segMan, sciAudioObject, kernel->findSelector("fileName")); Common::String fileName = segMan->getString(fileNameReg); @@ -102,11 +103,13 @@ void AudioPlayer::handleFanmadeSciAudio(reg_t sciAudioObject, SegManager *segMan fileName.setChar('/', i); } sciAudio->open("sciAudio/" + fileName); + Audio::SeekableAudioStream *audioStream = Audio::makeMP3Stream(sciAudio, DisposeAfterUse::YES); // We only support one audio handle _mixer->playStream(soundType, &_audioHandle, Audio::makeLoopingAudioStream((Audio::RewindableAudioStream *)audioStream, loopCount)); +#endif } else if (command == "stop") { _mixer->stopHandle(_audioHandle); } else { -- cgit v1.2.3