mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
Cleanup FF sound.
svn-id: r19981
This commit is contained in:
parent
7a7eeaa79f
commit
67d1cc0cf9
@ -462,8 +462,13 @@ void Sound::playSoundData(byte *soundData, uint sound, uint pan, uint vol, bool
|
|||||||
byte flags;
|
byte flags;
|
||||||
int rate;
|
int rate;
|
||||||
|
|
||||||
if (ambient) {
|
if (ambient == true) {
|
||||||
if (_ambientPaused || sound == _ambientPlaying)
|
if (sound == _ambientPlaying)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_ambientPlaying = sound;
|
||||||
|
|
||||||
|
if (_ambientPaused)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (_effectsPaused)
|
if (_effectsPaused)
|
||||||
@ -480,10 +485,11 @@ void Sound::playSoundData(byte *soundData, uint sound, uint pan, uint vol, bool
|
|||||||
byte *buffer = (byte *)malloc(size);
|
byte *buffer = (byte *)malloc(size);
|
||||||
memcpy(buffer, soundData + stream.pos(), size);
|
memcpy(buffer, soundData + stream.pos(), size);
|
||||||
|
|
||||||
if (ambient && sound == _ambientPlaying) {
|
if (ambient == true) {
|
||||||
_mixer->playRaw(&_effectsHandle, buffer, size, rate, flags);
|
_mixer->stopHandle(_ambientHandle);
|
||||||
} else {
|
|
||||||
_mixer->playRaw(&_ambientHandle, buffer, size, rate, Audio::Mixer::FLAG_LOOP|flags);
|
_mixer->playRaw(&_ambientHandle, buffer, size, rate, Audio::Mixer::FLAG_LOOP|flags);
|
||||||
|
} else {
|
||||||
|
_mixer->playRaw(&_effectsHandle, buffer, size, rate, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user