aboutsummaryrefslogtreecommitdiff
path: root/engines/sky/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2010-01-19 22:19:43 +0000
committerMax Horn2010-01-19 22:19:43 +0000
commit68826c27daabe92782053c17c838ef585cad28c8 (patch)
tree0d211c8701e3fbdc840dd24666fb42ba22fb0a9d /engines/sky/sound.cpp
parent428f8d6955202a238ea7a8e887d707503a487449 (diff)
downloadscummvm-rg350-68826c27daabe92782053c17c838ef585cad28c8.tar.gz
scummvm-rg350-68826c27daabe92782053c17c838ef585cad28c8.tar.bz2
scummvm-rg350-68826c27daabe92782053c17c838ef585cad28c8.zip
Get rid of Mixer::playRaw for good
svn-id: r47394
Diffstat (limited to 'engines/sky/sound.cpp')
-rw-r--r--engines/sky/sound.cpp9
1 files changed, 7 insertions, 2 deletions
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;
}