mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
make sure that the mutex protects everything that affects the buffer
svn-id: r7835
This commit is contained in:
parent
c152233f80
commit
1383ccbdbe
@ -152,6 +152,7 @@ int SoundMixer::playVorbis(PlayingSoundHandle *handle, OggVorbis_File *ov_file,
|
||||
#endif
|
||||
|
||||
void SoundMixer::mix(int16 *buf, uint len) {
|
||||
_syst->lock_mutex(_mutex);
|
||||
if (_paused) {
|
||||
memset(buf, 0, 2 * len * sizeof(int16));
|
||||
return;
|
||||
@ -168,7 +169,6 @@ void SoundMixer::mix(int16 *buf, uint len) {
|
||||
memset(buf, 0, 2 * len * sizeof(int16));
|
||||
}
|
||||
|
||||
_syst->lock_mutex(_mutex);
|
||||
/* now mix all channels */
|
||||
for (int i = 0; i != NUM_CHANNELS; i++)
|
||||
if (_channels[i])
|
||||
|
Loading…
Reference in New Issue
Block a user