aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
authorMax Horn2010-01-19 11:20:58 +0000
committerMax Horn2010-01-19 11:20:58 +0000
commitb227c660c6f0491a409a35bbb317f8558258e338 (patch)
tree23a14b43286f1ce8d2b92550284d9cd0a785b896 /engines/sky
parentf0a0ed8f9e01d3943f635b92af6f71ca83814f13 (diff)
downloadscummvm-rg350-b227c660c6f0491a409a35bbb317f8558258e338.tar.gz
scummvm-rg350-b227c660c6f0491a409a35bbb317f8558258e338.tar.bz2
scummvm-rg350-b227c660c6f0491a409a35bbb317f8558258e338.zip
Remove loop start/end params from Mixer::playRaw; convert some code from Mixer::playRaw to Mixer::playInputStream
svn-id: r47375
Diffstat (limited to 'engines/sky')
-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 f46b40be86..cf5dc78c21 100644
--- a/engines/sky/sound.cpp
+++ b/engines/sky/sound.cpp
@@ -33,6 +33,8 @@
#include "sky/sound.h"
#include "sky/struc.h"
+#include "sound/raw.h"
+
namespace Sky {
#define SOUND_FILE_BASE 60203
@@ -1115,10 +1117,13 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) {
flags |= Audio::Mixer::FLAG_LOOP;
}
+
+ Audio::AudioStream *stream = Audio::makeRawMemoryStream(_soundData + dataOfs, dataSize, DisposeAfterUse::NO, sampleRate, flags, loopSta, loopEnd);
+
if (channel == 0)
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound0, _soundData + dataOfs, dataSize, DisposeAfterUse::NO, sampleRate, flags, SOUND_CH0, volume, 0, loopSta, loopEnd);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_ingameSound0, stream, SOUND_CH0, volume, 0);
else
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound1, _soundData + dataOfs, dataSize, DisposeAfterUse::NO, sampleRate, flags, SOUND_CH1, volume, 0, loopSta, loopEnd);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_ingameSound1, stream, SOUND_CH1, volume, 0);
}
void Sound::fnStartFx(uint32 sound, uint8 channel) {