Thank you Jonatan, You gave me confidence that it was doable so then I tested without AUGraph which I was using.
So… I feel like I don’t understand something about how AUGraph works. I want to just say what I have tried. AUGraph flat out refuses to add a second RIO so I create the second RIO independent of the graph. Setup 1: AUGraph Containing: RIO -> MatrixMixer -> RIO Completely independent of AUGraph RIO2 ->RIO2 RIO2 registered for IAA via a ABFilterPort Result I get is that both streams flow as expected. Setup 2: AUGraph Containing: RIO -> MatrixMixer(Bus0) -> RIO RIO2 -> MatrixMixer(Bus1) -> RIO2 RIO2 registered for IAA via a ABFilterPort RIO2 setup independent from the graph then render callbacks to connect to to MatrixMixer Result is no audio flow on the first stream when starting the graph but as soon as an IAA connection is made to RIO2 audio starts flowing for both streams. There is actually quite a bit more complexity in the audio engine so I am going to work on creating a stripped down test app to be able to post and double check that I can reproduce in a simpler setup. I just wanted to ask if anyone was aware that using the graph this way is not allowed? > On Apr 15, 2016, at 4:25 AM, Jonatan Liljedahl <[email protected]> wrote: > >> Date: Thu, 14 Apr 2016 09:35:04 -0500 >> From: Lucas Goossen <[email protected]> >> To: CoreAudio API <[email protected]> >> Subject: Multiple RemoteIO >> Message-ID: <[email protected]> >> Content-Type: text/plain; charset=us-ascii >> >> I would like to be able to have access to hardware while simletaiously >> registering a remoteIO with IAA. I know this is possible becasue Audiobus >> does this when you create a ABFilterPort with processBlock. The filter port >> created has its own remoteIO that it uses for IAA under the hood, but I can >> still use my own remoteIO for hardware. When I try to replicate this myself >> by the whole AudioComponentFindNext - AudioComponentInstanceNew sequence the >> second remoteIO seems to kill the first. What am i missing? > > Yes, this is totally possible, and it's what I do in my app AUM - Audio Mixer: > > I have a main RIO unit for hardware I/O, that I never publish as an > IAA connectable node. > > AudioComponentDescription cd = {kAudioUnitType_Output, > kAudioUnitSubType_RemoteIO, kAudioUnitManufacturer_Apple, 0, 0}; > AudioComponent comp = AudioComponentFindNext(NULL, &cd); > OSStatus status = AudioComponentInstanceNew(comp, &unit); > etc... > And don't forget to AudioUnitInitialize() your unit. > > I set the client-side streamFormat to non-interleaved float, with the > same number of input/output channels as the currently connected > hardware route. > > Also I add a property listener on kAudioUnitProperty_StreamFormat to > be able to observe sample rate and channel-count changes and sync the > client-side stream format to avoid automatic sample-rate conversion by > the system. Also the usual enable IO for both input and output using > kAudioOutputUnitProperty_EnableIO, set > kAudioUnitProperty_MaximumFramesPerSlice to 4096, and set my main > render callback with kAudioUnitProperty_SetRenderCallback. > > Then, I create 8 additional RIO units for my IAA output ports: > > Same thing to create RIO units for these, except I disable input since > they are output ports and not filter ports. The render callback for > these units provide the audio to the host. I set the stream format to > stereo float using the current sample rate (and in the main RIO unit > StreamFormat listener callback I update the format on these IAA units > as well!) > > Then I publish the IAA units, if using Audiobus this is taken care of > by creating an ABSenderPort for each unit and adding it to the > audiobusController. > > I have some various developer notes regarding iOS audio and IAA here: > http://lijon.github.io > > Important stuff regarding multiple IAA ports: > http://lijon.github.io/iaa_quirks.html > > And how sample rates and stream formats work in IAA (there's actually > a chain of 3 different streamFormats, with 2 potential places for > sample rate conversion, in each direction of the host<->node audio > signal flow): http://lijon.github.io/iaa_sample_rates.html > > -- > /Jonatan > http://kymatica.com > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Coreaudio-api mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/coreaudio-api/lucas%40goosesoft.com > > This email sent to [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
