From 68826c27daabe92782053c17c838ef585cad28c8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Jan 2010 22:19:43 +0000 Subject: Get rid of Mixer::playRaw for good svn-id: r47394 --- engines/agos/res_snd.cpp | 2 -- engines/agos/sound.cpp | 11 +++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index 4f3582b55d..00d677727d 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -23,8 +23,6 @@ * */ - - #include "common/config-manager.h" #include "common/file.h" diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 5b9257b068..4309b57089 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -23,8 +23,6 @@ * */ - - #include "common/file.h" #include "common/util.h" @@ -35,6 +33,7 @@ #include "sound/flac.h" #include "sound/mixer.h" #include "sound/mp3.h" +#include "sound/raw.h" #include "sound/voc.h" #include "sound/vorbis.h" #include "sound/wave.h" @@ -277,7 +276,9 @@ void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ byte *buffer = (byte *)malloc(size); assert(buffer); _file->read(buffer, size); - _mixer->playRaw(type, handle, buffer, size, DisposeAfterUse::YES, 22050, flags); + + Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, size, DisposeAfterUse::YES, 22050, flags); + _mixer->playInputStream(type, handle, stream); } #ifdef USE_MAD @@ -743,7 +744,9 @@ void Sound::playRawData(byte *soundData, uint sound, uint size, uint freq) { byte flags = 0; if (_vm->getPlatform() == Common::kPlatformPC) flags = Audio::Mixer::FLAG_UNSIGNED; - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_effectsHandle, buffer, size, DisposeAfterUse::YES, freq, flags); + + Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, size, DisposeAfterUse::YES, freq, flags); + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, stream); } // Feeble Files specific -- cgit v1.2.3