On Apr 6, 2009, at 2:02 PM, William Stewart wrote: Right - so you just need to make a connection on one of your input buses of your mixer, to the output bus, element 1, of the aurio unit in your graph - that's your audio device input coming into your graph
That should work just fine (its how we also do this on the desktop with AULab for instance)
Wow, so I don't have to use the CAPlayThrough technique of copying samples to a ring buffer and then providing those to my mixer via a callback? Well, that'll help!
Still, not there yet. Given that remoteIONode already exists (having been created as the last node in the graph), I'm doing this: // set up input from rio bus 1 into the mixer (bill says so!) setupErr = AUGraphConnectNodeInput(auGraph, remoteIONode, 1, mixerNode, 3);
So far, I'm still not hearing any input from the mic mixed with my other sources. I've preceded this AUGraphConnectNodeInput with code to enable input on the remoteIONode and set its input format, but these steps are apparently not sufficient.
// enable rio input AudioUnitElement inputBus = 1; setupErr = AudioUnitSetProperty(remoteIOUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, 1, &inputBus, sizeof(inputBus)); [self throwIfErr:setupErr withMessage:@"couldn't enable rio input"];
// set rio input format? setupErr = AudioUnitSetProperty (remoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outputDesc, sizeof (outputDesc)); [self throwIfErr:setupErr withMessage:@"Couldn't set RIO input format"];
Anyways, I'll keep at it. Thanks for the tip.
--Chris
|