tech74
tech74

Reputation: 231

How to connect Remote IO mic to input of 2 mixer units?

using iphone sdk 4.3. I am trying to connect the Remote IO mic connection to the input of 2 mixer units in an AUGraph. However with the following code only the first connection works and the second fails with error code -10862 (Audio processing graphs can only contain one output unit)

        result = AUGraphConnectNodeInput (
                                          processingGraph,
                                          iONode,         // source node
                                          1,                 // source node output bus number
                                          mixerNode1,            // destination node
                                          1                 // desintation node input bus number
                                          );

        result = AUGraphConnectNodeInput (
                                          processingGraph,
                                          iONode,         // source node
                                          1,                 // source node output bus number
                                          mixerNode2,            // destination node
                                          1                 // desintation node input bus number

So how can i feed the input of the mic to input of 2 mixers? );

Upvotes: 2

Views: 871

Answers (2)

arielyz
arielyz

Reputation: 608

I know the question is really old - but I needed a solution for that as well. So this is what I came up with....

You can use kAudioUnitSubType_Splitter.

An audio unit with one input bus and two output buses. The audio unit duplicates the input signal to each of its two output buses.

Have a look at Apple's documentation

Upvotes: 1

Aran Mulholland
Aran Mulholland

Reputation: 23935

You cannot connect the same output to two separate inputs. The core audio model is a pull model with each node requesting samples from the previous node that it is connected to. If two mixers were requesting samples from one node you would get samples 0..255 in one mixer and samples 256 - 511 in the next mixer (if the buffer size was 256 samples). If you want a scenario like this to work buffer the samples from the mic input and then give access to the buffer in both the mixers callbacks.

Upvotes: 2

Related Questions