diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/backends/coreaudio.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index 9f674389..3a56c25f 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -464,6 +464,14 @@ void CoreAudioCapture::open(const ALCchar *name) if(err != noErr) throw al::backend_exception{ALC_INVALID_VALUE, "Could not set capture callback: %u", err}; + // Disable buffer allocation for capture + Uint32 flag{0}; + err = AudioUnitSetProperty(mAudioUnit, kAudioUnitProperty_ShouldAllocateBuffer, + kAudioUnitScope_Output, 1, &flag, sizeof(flag)); + if(err != noErr) + throw al::backend_exception{ALC_INVALID_VALUE, + "Could not disable buffer allocation property: %u", err}; + // Initialize the device err = AudioUnitInitialize(mAudioUnit); if(err != noErr) |