aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/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/scumm/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/scumm/sound.cpp')
-rw-r--r--engines/scumm/sound.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 4206ff80d9..788be2d0d6 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -203,7 +203,9 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (byte *)malloc(size);
memcpy(sound, ptr, size);
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, DisposeAfterUse::YES, rate, flags, soundID);
+
+ stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, flags);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
// WORKAROUND bug # 1311447
else if (READ_BE_UINT32(ptr) == 0x460e200d) {
@@ -225,7 +227,8 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (byte *)malloc(size);
memcpy(sound, ptr, size);
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, DisposeAfterUse::YES, rate, flags, soundID);
+ stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, flags);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
// Support for sampled sound effects in Monkey Island 1 and 2
else if (READ_BE_UINT32(ptr) == MKID_BE('SBL ')) {
@@ -296,7 +299,8 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (byte *)malloc(size);
memcpy(sound, ptr + 6, size);
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, DisposeAfterUse::YES, rate, flags, soundID);
+ stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, flags);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
else if ((_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 3) || READ_BE_UINT32(ptr) == MKID_BE('SOUN') || READ_BE_UINT32(ptr) == MKID_BE('TOWS')) {