Hi Pier,
I’ve just been through something similar. I believe that answer is yes, you may only have one RemoteIO unit. Also you definitely need a RemoteIO as the last unit to send the audio to the hardware. Reference: http://lists.apple.com/archives/coreaudio-api/2009/Apr/msg00042.html
I’ve not much experience with using the mic, but I would think you could accomplish what you need with the following setup:
1. Mixer output bus 0 -> Remote IO Input bus 0
2. Render Notify attached to RemoteIO which processes the prerender phase on bus 1 (i.e., if (bus != 1 || !(ioFlags & k...PreRender)) return noErr; ) and which stores the mic data in a ring buffer
3. Attach a custom render callback to Mixer input bus 0 which reads from the ring buffer
4. Attach your other source to mixer input bus 1
You could also skip the mixer unit entirely and do the mixing manually inside of the RemoteIO’s render notify callback using the lightning fast vDSP functions in the Accelerate framework.
Gratefully,
Hari Karam Singh
http://soundwandapp.com/
http://club15cc.com/
From: coreaudio-api-bounces+harikaram=email@hidden [mailto:coreaudio-api-bounces+harikaram=email@hidden] On Behalf Of Pier
Sent: 06 November 2012 08:22
To: email@hidden
Subject: RemoteIO Question
**RemoteIO1 (for recording to buffer) -> 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
1) Takes audio from RemoteIO - input 0
2) Mixes the audio from (1) with audio from the buffer - input1
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,
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)
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?