mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 15:48:48 +00:00
Get rid of two more FLAG_LOOP instances
svn-id: r47459
This commit is contained in:
parent
409e44e7c3
commit
8508a97add
@ -415,15 +415,9 @@ Audio::AudioStream *DosSoundMan_br::loadChannelData(const char *filename, Channe
|
||||
// TODO: Confirm sound rate
|
||||
int rate = 11025;
|
||||
|
||||
uint32 loopStart = 0, loopEnd = 0;
|
||||
uint32 flags = Audio::FLAG_UNSIGNED;
|
||||
|
||||
if (looping) {
|
||||
loopEnd = dataSize;
|
||||
flags |= Audio::FLAG_LOOP;
|
||||
}
|
||||
|
||||
ch->stream = Audio::makeRawMemoryStream(data, dataSize, DisposeAfterUse::YES, rate, flags, loopStart, loopEnd);
|
||||
ch->stream = Audio::makeLoopingAudioStream(
|
||||
Audio::makeRawMemoryStream(data, dataSize, DisposeAfterUse::YES, rate, Audio::FLAG_UNSIGNED),
|
||||
looping ? 0 : 1);
|
||||
return ch->stream;
|
||||
}
|
||||
|
||||
|
@ -169,14 +169,12 @@ void CUP_Player::updateSfx() {
|
||||
uint8 *soundData = _sfxBuffer + offset;
|
||||
if (READ_BE_UINT32(soundData) == MKID_BE('DATA')) {
|
||||
uint32 soundSize = READ_BE_UINT32(soundData + 4);
|
||||
uint32 flags = Audio::FLAG_UNSIGNED;
|
||||
uint32 loopEnd = 0;
|
||||
if (sfx->flags & kSfxFlagLoop) {
|
||||
flags |= Audio::FLAG_LOOP;
|
||||
loopEnd = soundSize - 8;
|
||||
}
|
||||
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &sfxChannel->handle,
|
||||
Audio::makeRawMemoryStream(soundData + 8, soundSize - 8, DisposeAfterUse::NO, 11025, flags, 0, loopEnd));
|
||||
Audio::makeLoopingAudioStream(
|
||||
Audio::makeRawMemoryStream(soundData + 8, soundSize - 8, DisposeAfterUse::NO, 11025, Audio::FLAG_UNSIGNED),
|
||||
(sfx->flags & kSfxFlagLoop) ? 0 : 1
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
warning("Unable to find a free channel to play sound %d", sfx->num);
|
||||
|
Loading…
Reference in New Issue
Block a user