aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/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/agos/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/agos/sound.cpp')
-rw-r--r--engines/agos/sound.cpp11
1 files changed, 7 insertions, 4 deletions
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