aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-18 17:32:07 -0800
committerChris Robinson <[email protected]>2017-02-18 17:32:07 -0800
commit247f56249ade334f8f7ef9eda9c380af0278562f (patch)
tree9c342e82e26e39bc7b075b62ca33ddd97969015f /Alc/backends/winmm.c
parent2448f88e70f6207ad5743f0a55eaa5de7cbce737 (diff)
Always lock the device backend before calling aluMixData
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r--Alc/backends/winmm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 9d8f8e9d..2b6db4ad 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -232,8 +232,10 @@ FORCE_ALIGN static int ALCwinmmPlayback_mixerProc(void *arg)
}
WaveHdr = ((WAVEHDR*)msg.lParam);
+ ALCwinmmPlayback_lock(self);
aluMixData(device, WaveHdr->lpData, WaveHdr->dwBufferLength /
self->Format.nBlockAlign);
+ ALCwinmmPlayback_unlock(self);
// Send buffer back to play more data
waveOutWrite(self->OutHdl, WaveHdr, sizeof(WAVEHDR));