AudioUnitSetProperty(outputUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &numFrames, sizeof(numFrames));
OSStatus status = AudioUnitRender(outputUnit, 0, timeStamp, 0, (UInt32)bufferLength, bufferList);
I no longer get the -10874 status error. But now I get a different error, kAudio_ParamError(-50)
The params appear OK so I'm not sure why this is happening.
(lldb) po outputUnit
0x00000000809c806a
(lldb) po timeStamp
0x00007fff5fbfeaa0
(lldb) po bufferLength
3756
(lldb) po bufferList
0x0000618000044e90
(lldb) po self.engine
________ GraphDescription ________
AVAudioEngineGraph 0x6100001c03c0: initialized = 1, running = 0, number of nodes = 4
******** output chain ********
node 0x6080000a12c0 {'auou' 'ahal' 'appl'}, 'I'
inputs = 1
(bus0) <- (bus0) 0x6100000c8ff0, {'aumx' 'mcmx' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6100000c8ff0 {'aumx' 'mcmx' 'appl'}, 'I'
inputs = 1
(bus0) <- (bus0) 0x6000000c2a00, {'aufx' 'dist' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
outputs = 1
(bus0) -> (bus0) 0x6080000a12c0, {'auou' 'ahal' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6000000c2a00 {'aufx' 'dist' 'appl'}, 'I'
inputs = 1
(bus0) <- (bus0) 0x6100001804e0, {'augn' 'sspl' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
outputs = 1
(bus0) -> (bus0) 0x6100000c8ff0, {'aumx' 'mcmx' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6100001804e0 {'augn' 'sspl' 'appl'}, 'I'
outputs = 1
(bus0) -> (bus0) 0x6000000c2a00, {'aufx' 'dist' 'appl'}, [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
______________________________________
(lldb) po self.engine.outputNode
<AVAudioOutputNode: 0x600000000a00>
(lldb) po self.engine.outputNode.audioUnit
0x00000000809c806a