aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-07 23:22:06 -0700
committerChris Robinson <[email protected]>2019-10-07 23:22:06 -0700
commit52a003e9bb7c870f26436b38e62edc96385805dc (patch)
tree7625ddfd05dc06c62f8870c2f24cd22bdf5ddd68 /alc/backends/coreaudio.cpp
parentf0fa6c6baf673a35337d2f2cb5548dd1e33c11e7 (diff)
Avoid raw lock/unlock calls
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r--alc/backends/coreaudio.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 9254dbe0..3a97c105 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -81,9 +81,8 @@ CoreAudioPlayback::~CoreAudioPlayback()
OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*,
const AudioTimeStamp*, UInt32, UInt32, AudioBufferList *ioData)
{
- lock();
+ std::lock_guard<CoreAudioPlayback> _{*this};
aluMixData(mDevice, ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize);
- unlock();
return noErr;
}