aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/coreaudio.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/coreaudio.c
parent2448f88e70f6207ad5743f0a55eaa5de7cbce737 (diff)
Always lock the device backend before calling aluMixData
Diffstat (limited to 'Alc/backends/coreaudio.c')
-rw-r--r--Alc/backends/coreaudio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c
index 24aeabd4..eb93f9ea 100644
--- a/Alc/backends/coreaudio.c
+++ b/Alc/backends/coreaudio.c
@@ -89,8 +89,10 @@ static OSStatus ca_callback(void *inRefCon, AudioUnitRenderActionFlags *ioAction
ALCdevice *device = (ALCdevice*)inRefCon;
ca_data *data = (ca_data*)device->ExtraData;
+ ALCdevice_Lock(device);
aluMixData(device, ioData->mBuffers[0].mData,
ioData->mBuffers[0].mDataByteSize / data->frameSize);
+ ALCdevice_Unlock(device);
return noErr;
}