Re: AUGraphConnect/Disconnect and StereoMixer
Re: AUGraphConnect/Disconnect and StereoMixer
- Subject: Re: AUGraphConnect/Disconnect and StereoMixer
- From: William Stewart <email@hidden>
- Date: Thu, 10 Aug 2006 11:59:40 -0700
On 09/08/2006, at 2:21 PM, Hari Seldon wrote:
Hey,
I'm just about to get my main coreaudio based design finished, but
seem to have encountered a little problem.
I have a graph connecting a bunch of nodes; a StereoMixer feeding
the default output device. I plan to have a bunch of AUConverters,
each one representing an audio data stream (i'll be using their
input callbacks to feed them data from another thread when ready)
and plan to connect/disconnect the converters at various times.
From what I've seen I can just use AUGraphConnectNodeInput and
AUGraphUpdate to add sources, and similarly
AUGraphDisconnectNodeInput and AUGraphUpdate to remove sources.
The problem I'm curious about is the inDestInputNumber parameter to
these functions.
If I'm connecting various converter nodes to the mixer, do I have
to keep track of what the next inDestInputNumber should be for the
mixer?
A connection is made using between the output of one AU and the input
of another. AUs can (and mixers for instance do) have multiple ins
(or outs) - so when you make a connection you connect to a specified
input of the destination AU. You can only have a single connection
from a given output or to a given input - that is, fan in/out is
explicitly disallowed.
So, yes - you will need to know which input(s) are free on your mixer
in order to make a new connection to them.
And related to that do I have to keep track of it for disconnecting
them, or do i call disconnect on the actual source node (the
converter)?
Yes - you disconnect by specifying the dest AU and the input
Lastly, if I have say 3 converters connected to the mixer, and I'm
going to disconnect one of them (not the last one), do I have to
remember the mixer input index of the converter that was removed so
that I insert the next one at that location?
No - there's no requirement that connections be made starting at
input 0. Its perfectly valid to connect to say input 10, 14, 3
Bill
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden