mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
Cleanup.
svn-id: r47133
This commit is contained in:
parent
a597e5fef9
commit
b47725540f
@ -788,10 +788,7 @@ void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint soun
|
||||
convertVolume(vol);
|
||||
convertPan(pan);
|
||||
|
||||
if (loop)
|
||||
_mixer->playInputStreamLooping(Audio::Mixer::kSFXSoundType, handle, sndStream, 0, -1, vol, pan);
|
||||
else
|
||||
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, sndStream, -1, vol, pan);
|
||||
_mixer->playInputStreamLooping(Audio::Mixer::kSFXSoundType, handle, sndStream, loop ? 0 : 1, -1, vol, pan);
|
||||
}
|
||||
|
||||
void Sound::stopSfx5() {
|
||||
|
@ -340,10 +340,7 @@ int32 Sound::playFx(Audio::SoundHandle *handle, byte *data, uint32 len, uint8 vo
|
||||
|
||||
assert(input);
|
||||
|
||||
if (loop)
|
||||
_vm->_mixer->playInputStreamLooping(soundType, handle, input, 0, -1, vol, pan, true, false, isReverseStereo());
|
||||
else
|
||||
_vm->_mixer->playInputStream(soundType, handle, input, -1, vol, pan, true, false, isReverseStereo());
|
||||
_vm->_mixer->playInputStreamLooping(soundType, handle, input, loop ? 0 : 1, -1, vol, pan, true, false, isReverseStereo());
|
||||
|
||||
return RD_OK;
|
||||
}
|
||||
|
@ -954,11 +954,7 @@ void TuckerEngine::loadSound(Audio::Mixer::SoundType type, int num, int volume,
|
||||
|
||||
if (stream) {
|
||||
_mixer->stopHandle(*handle);
|
||||
|
||||
if (loop)
|
||||
_mixer->playInputStreamLooping(type, handle, stream, 0, -1, scaleMixerVolume(volume, kMaxSoundVolume));
|
||||
else
|
||||
_mixer->playInputStream(type, handle, stream, -1, scaleMixerVolume(volume, kMaxSoundVolume));
|
||||
_mixer->playInputStreamLooping(type, handle, stream, loop ? 0 : 1, -1, scaleMixerVolume(volume, kMaxSoundVolume));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,6 +274,13 @@ void Mixer::playInputStreamLooping(
|
||||
bool permanent,
|
||||
bool reverseStereo) {
|
||||
|
||||
// Just in case the user wants the stream just looped once, we will take care of that with the normal
|
||||
// playInputStream method
|
||||
if (loopCount == 1) {
|
||||
playInputStream(type, handle, input, id, volume, balance, autofreeStream, permanent, reverseStereo);
|
||||
return;
|
||||
}
|
||||
|
||||
LoopingAudioStream *loopingStream = new LoopingAudioStream(input, loopCount, autofreeStream);
|
||||
assert(loopingStream);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user