Re: Sample rates and AUGraphs
Re: Sample rates and AUGraphs
- Subject: Re: Sample rates and AUGraphs
- From: Robert Grant <email@hidden>
- Date: Tue, 25 Jan 2005 14:23:24 -0500
Hey Bill,
Thanks for the info. I guess I'm surprised (and a little disappointed
about the need to tear down and rebuild an entire graph just to add a
node. Why can't I stop the graph, add the node, get the AU from the
node, initialize it so it's compatible and then restart the graph?
And by the way - my graph is quite complex. It has 16 subgraphs and a
bunch of connections between two matrix mixers (with AUs in between).
So tearing it all down and rebuilding is not something I'm excited
about. :-)
Robert.
On Jan 21, 2005, at 3:21 PM, William Stewart wrote:
On 21/01/2005, at 7:28 AM, Robert Grant wrote:
I'm sure everyone is at NAMM but here goes anyway...
I seem to have gotten myself in a tangle dealing with setting the
sample rate on AUs in a graph. It seems to work some of the time with
some AUs but not universally.
And if I create a node (in an already initialized and running graph)
I imagined that the node would inherit at least the broad
characteristics of the graph (such as sample rate) but it appears
not.
Nope - the node's AU is just opened. Where is the API that says a
Graph is running at a particular sample rate? What would that mean if
you had converter AU's in the graph to convert between different
sample rates?
This is a semantic you have to manage.
But setting the sample rate after creating the node in a running
graph seems to cause a blockage (i.e. the AU is no longer being
pulled) with the Apple Effect AUs (which I believe to be the gold
standard) even though some others (digitalfishphones for example) are
happy....
You are changing the format which exists between the output of one AU
and the input of another.... so, both sides have to be changed, and
the AU's have to uninitialized to have the format changed. If you have
a graph that is running at a particular sample rate, its actually
pretty easy to do this:
(1) Stop the graph
(2) Uninitialize the graph
(3) Cache all the connections of the graph
(4) Disconnect all the graph
(5) Iterate through the connections and set the sample rate on each
side of the connection (remember each connection is unique, so you
just do both sides)
(6) Reconnect the graph
(7) Initialize the graph
(8) Start the graph
One possibly better alternative to (5) is to iterate through all of
the nodes of the graph, and for each node get its inputs and outputs,
and set each of these to the new sample rate (you have to special case
the output unit here of course, because the device sides of the AUHAL
won't let you set their formats).. This takes care of the fact that
you might have an AU that has inputs or outputs that aren't actually
connected...
Bill
So some general guidance would be handy - at the moment I don't feel
I can see the forest for the trees.
Thanks,
Robert.
_______________________________________________
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
_______________________________________________________________________
___
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
_______________________________________________________________________
___
_______________________________________________
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