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/sky/sound.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines/sky/sound.cpp') diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index cf5dc78c21..83ddc11a6b 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -33,6 +33,7 @@ #include "sky/sound.h" #include "sky/struc.h" +#include "sound/audiostream.h" #include "sound/raw.h" namespace Sky { @@ -1043,7 +1044,9 @@ void Sound::playSound(uint32 id, byte *sound, uint32 size, Audio::SoundHandle *h memcpy(buffer, sound+sizeof(DataFileHeader), size); _mixer->stopID(id); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer, size, DisposeAfterUse::YES, 11025, flags, id); + + Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, size, DisposeAfterUse::YES, 11025, flags); + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, id); } void Sound::loadSection(uint8 pSection) { @@ -1245,7 +1248,9 @@ bool Sound::startSpeech(uint16 textNum) { rate = 11025; _mixer->stopID(SOUND_SPEECH); - _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, playBuffer, speechSize, DisposeAfterUse::YES, rate, Audio::Mixer::FLAG_UNSIGNED, SOUND_SPEECH); + + Audio::AudioStream *stream = Audio::makeRawMemoryStream(playBuffer, speechSize, DisposeAfterUse::YES, rate, Audio::Mixer::FLAG_UNSIGNED); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, stream, SOUND_SPEECH); return true; } -- cgit v1.2.3