How to connect input channels from AVAudioInputNode to different nodes
How to connect input channels from AVAudioInputNode to different nodes
- Subject: How to connect input channels from AVAudioInputNode to different nodes
- From: Sven Thoennissen via Coreaudio-api <email@hidden>
- Date: Fri, 2 Jul 2021 13:55:00 +0200
Dear all,
In AVAudioEngine, what is the best way to separate each input channel from the
input bus of an instance of AVAudioInputNode into its own bus?
When a multi-input audio interface is connected, it seems that AVAudioInputNode
has one output bus that includes all input channels.
For example, with a 6-input interface, with a mic on channel 1 and a synth on
channels 5+6 I want to send channel 1 to some mixer AU, and channels 5 and 6 to
a different mixer.
I haven’t found any way with AVFoundation to accomplish that. I did find a
solution but I remain doubtful (see below).
GarageBand for iOS offers to record from any input in mono or stereo pairs.
How does it do that? Apple recommends to use the AUv3 API but somehow I believe
GarageBand uses some manual bus-splitting code with a C callback.
In WWDC Apple typically uses simple mono or stereo examples but musicians have
audio interfaces with multi I/O so I wonder if and how AVAudioEngine supports
access to input channels.
It seems to be overly complex to do the effort and write an audio callback in
C, only to split the input channels and feed them further into my large AU
chain.
(Which contains up to 48 custom samplers, 16 submixers, 4 final mixers, several
external AUs, and even more mixers just to be able to have dry/wet connections)
I have attempted to solve this by writing a ChannelSplitter AU that takes the
6-ch bus as input and sends 6 output busses with 1 channel each.
I am not sure if this is a proper solution since my customer reports some
recent unusual audio artifacts.
Thanks for any thoughts.
-Sven
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden