aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-08-17 03:56:53 -0700
committerChris Robinson <[email protected]>2022-08-17 03:56:53 -0700
commit4115df49cfe1e3d0bc1723996c90d0a5bcf1f1f3 (patch)
tree9c51a6875c7fa6ab61151c2274a685abe0006949
parent90f02176dd46f0754ed0c5f1e95b9ba9917839bb (diff)
Pass the action flags to AudioUnitRender from the callback
-rw-r--r--alc/backends/coreaudio.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index b1b7b63a..71b57fde 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -561,11 +561,10 @@ CoreAudioCapture::~CoreAudioCapture()
}
-OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*,
+OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
AudioBufferList*) noexcept
{
- AudioUnitRenderActionFlags flags = 0;
union {
al::byte _[sizeof(AudioBufferList) + sizeof(AudioBuffer)*2];
AudioBufferList list;
@@ -595,7 +594,7 @@ OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*,
audiobuf.list.mBuffers[1].mData = rec_vec.second.buf;
audiobuf.list.mBuffers[1].mDataByteSize = remaining * mFormat.mBytesPerFrame;
}
- OSStatus err{AudioUnitRender(mAudioUnit, &flags, inTimeStamp, inBusNumber,
+ OSStatus err{AudioUnitRender(mAudioUnit, ioActionFlags, inTimeStamp, inBusNumber,
inNumberFrames, &audiobuf.list)};
if(err != noErr)
{