Question

I'm trying to do this

RemoteIO1 (for recording to buffer) -> kAudioUnitType_Mixer -> RemoteIO2 (for playback of output)

RemoteIO1 is used for 2 purposes :

1) To feed audio into the mixer channel 0

2) To record audio from mic to a buffer

kAudioUnitType_Mixer

1) Takes audio from RemoteIO - input 0

2) Mixes the audio from (1) with audio from the buffer - input1

RemoteIO2

1) Takes the mixed audio and sends it to playback

Initially I thought that I could just playback from mixer output but the following gives me an error. Can I confirm that I need another RemoteIO to do playback?

// Enable Mixer for playback
status = AudioUnitSetProperty(_mixerUnit,
                              kAudioOutputUnitProperty_EnableIO,
                              kAudioUnitScope_Output,
                              mixerOutputBus,
                              &flag,
                              sizeof(flag));

if (noErr != status) { NSLog(@"Enable Mixer for playback error"); return; }

Also, I did the following test and realised there seems to be only one RemoteIO available (addresses for inputComponent and inputComponent2 are the same)

// Get component
AudioComponent inputComponent = AudioComponentFindNext(NULL, &desc);
AudioComponent inputComponent2 = AudioComponentFindNext(NULL, &desc);

Is it true that I can only have one instance of RemoteIO in my app? If so, what are the alternatives for the 2nd RemoteIO?

Thanks.

Pier.

Was it helpful?

Solution

I have learnt since that 2 remoteIOs are not possible for iOS. (please correct me if I am wrong). RemoteIO acts like a socket in the wall - one plug says "Input" and the other says "Output". "Input" is not connected to "Output". Hence I was able to connect my mixer's output to the remoteIO's output. At the same time, I captured mic audio from RemoteIO input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top