On OSX 10.13.5 I am trying to get the AVAudioEngine working I am experiencing crashes...
I am trying to get the engine running using an external thunderbolt sound card (UAD Apollo).
I am trying to only build a simple graph to get things working:
audioInput -> NI-Reaktor -> audioOutput
The AVAudioEngine prepares and runs correctly when I do not connect the inputNode. HOWEVER, the processing plugin (Reaktor) receives garbarge buffers at it's inputs... (LOUD!)
Does anyone have some experience they could share with me please?
Thanks in advance,
|K<
the exception raised:
*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: 0 == inCurrNode.NumberOfValidConnections(kUpstream)'
The engine connection code I've got looks like this:
AVAudioFormat* outputFormat = [self.engine.outputNode outputFormatForBus:0];
AVAudioFormat* inputsFormat = [self.engine.inputNode inputFormatForBus:0];
AVAudioNode* audioOutputNode = self.engine.outputNode;
AVAudioNode* audioInputNode = self.engine.inputNode;
AVAudioNode* reaktorNode = self.reaktorAU;
[self.engine connect:audioInputNode to:reaktorNode fromBus:0 toBus:0 format:nil];// crashes
// [self.engine connect:audioInputNode to:reaktorNode format:inputsFormat]; crashes
// [self.engine connect:audioInputNode to:reaktorNode format:nil]; crashes
// [self.engine connect:audioInputNode to:reaktorNode format:outputFormat]; crashes
[self.engine connect:reaktorNode to:audioOutputNode format:outputFormat];
[self.engine prepare]; // this is where the crash happens.
the resulting AUGraph looks like this:
(lldb) po self.engine
________ GraphDescription ________
AVAudioEngineGraph 0x1006135d0: initialized = 0, running = 0, number of nodes = 3
******** output chain ********
node 0x6000000e1c80 {'auou' 'ahal' 'appl'}, 'U'
inputs = 1
(bus0, en1) <- (bus0) 0x6000000e3e00, {'aumu' 'NiR6' '-NI-'}, [10 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6000000e3e00 {'aumu' 'NiR6' '-NI-'}, 'U'
inputs = 1
(bus0, en1) <- (bus1) 0x6080000e3c80, {'auou' 'ahal' 'appl'}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
outputs = 1
(bus0, en1) -> (bus0) 0x6000000e1c80, {'auou' 'ahal' 'appl'}, [10 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6080000e3c80 {'auou' 'ahal' 'appl'}, 'U'
outputs = 2
(bus0, en0) -> (bus0) 0x0, {}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
(bus1, en1) -> (bus0) 0x6000000e3e00, {'aumu' 'NiR6' '-NI-'}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
******** input chain ********
node 0x6080000e3c80 {'auou' 'ahal' 'appl'}, 'U'
outputs = 2
(bus0, en0) -> (bus0) 0x0, {}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
(bus1, en1) -> (bus0) 0x6000000e3e00, {'aumu' 'NiR6' '-NI-'}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6000000e3e00 {'aumu' 'NiR6' '-NI-'}, 'U'
inputs = 1
(bus0, en1) <- (bus1) 0x6080000e3c80, {'auou' 'ahal' 'appl'}, [ 2 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
outputs = 1
(bus0, en1) -> (bus0) 0x6000000e1c80, {'auou' 'ahal' 'appl'}, [10 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 0x6000000e1c80 {'auou' 'ahal' 'appl'}, 'U'
inputs = 1
(bus0, en1) <- (bus0) 0x6000000e3e00, {'aumu' 'NiR6' '-NI-'}, [10 ch, 96000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
______________________________________