aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2010-01-19 23:50:33 +0000
committerMax Horn2010-01-19 23:50:33 +0000
commitcebaa0b0d305aecbdd60424eff1890ebde66312a (patch)
tree6b24ac15f231dd9f3a9f00ae20af38326bcead8c /engines/scumm
parentbce959e0465fd6d5f92b05f338ffde24820bb1ed (diff)
downloadscummvm-rg350-cebaa0b0d305aecbdd60424eff1890ebde66312a.tar.gz
scummvm-rg350-cebaa0b0d305aecbdd60424eff1890ebde66312a.tar.bz2
scummvm-rg350-cebaa0b0d305aecbdd60424eff1890ebde66312a.zip
Started to get rid of Audio::FLAG_LOOP
svn-id: r47397
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/sound_he.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 5b19322290..48adca2ca9 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -528,7 +528,7 @@ byte *findSoundTag(uint32 tag, byte *ptr) {
}
void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) {
- Audio::AudioStream *stream = 0;
+ Audio::RewindableAudioStream *stream = 0;
byte *ptr, *spoolPtr;
int size = -1;
int priority, rate;
@@ -636,7 +636,6 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
// TODO: Extra sound flags
if (heFlags & 1) {
- flags |= Audio::FLAG_LOOP;
_heChannel[heChannel].timer = 0;
} else {
_heChannel[heChannel].timer = size * 1000 / rate;
@@ -668,11 +667,12 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
#ifdef SCUMM_LITTLE_ENDIAN
flags |= Audio::FLAG_LITTLE_ENDIAN;
#endif
- stream = Audio::makeRawMemoryStream(sound + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags, 0, 0);
+ stream = Audio::makeRawMemoryStream(sound + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags);
} else {
- stream = Audio::makeRawMemoryStream(ptr + memStream.pos() + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags, 0, 0);
+ stream = Audio::makeRawMemoryStream(ptr + memStream.pos() + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags);
}
- _mixer->playInputStream(type, &_heSoundChannels[heChannel], stream, soundID);
+ _mixer->playInputStream(type, &_heSoundChannels[heChannel],
+ Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID);
}
// Support for sound in Humongous Entertainment games
else if (READ_BE_UINT32(ptr) == MKID_BE('DIGI') || READ_BE_UINT32(ptr) == MKID_BE('TALK')) {
@@ -722,7 +722,6 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
// TODO: Extra sound flags
if (heFlags & 1) {
- flags |= Audio::FLAG_LOOP;
_heChannel[heChannel].timer = 0;
} else {
_heChannel[heChannel].timer = size * 1000 / rate;
@@ -730,8 +729,9 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
_mixer->stopHandle(_heSoundChannels[heChannel]);
- stream = Audio::makeRawMemoryStream(ptr + heOffset + 8, size, DisposeAfterUse::NO, rate, flags, 0, 0);
- _mixer->playInputStream(type, &_heSoundChannels[heChannel], stream, soundID);
+ stream = Audio::makeRawMemoryStream(ptr + heOffset + 8, size, DisposeAfterUse::NO, rate, flags);
+ _mixer->playInputStream(type, &_heSoundChannels[heChannel],
+ Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID);
}
// Support for PCM music in 3DO versions of Humongous Entertainment games
else if (READ_BE_UINT32(ptr) == MKID_BE('MRAW')) {