• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sample rates and AUGraphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sample rates and AUGraphs


  • Subject: Re: Sample rates and AUGraphs
  • From: William Stewart <email@hidden>
  • Date: Tue, 25 Jan 2005 12:38:20 -0800


On 25/01/2005, at 11:23 AM, Robert Grant wrote:

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?

You can - I thought we were talking about resetting the sample rate of an entire graph. But sure, if you are just inserting a new node in, you just have to make sure it matches and away you go.



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. :-)

Hmm... its not that hard - the AUGraph APIs' can help here quite a bit, and if you are going to respond to a change in the sample rate of the device, then you need to do something (even if its just to completely tear everything down and rebuild) - the iterate through the graph is quite easy to manage (just watch out for the AUHALs device sides (output, el=0; input, el=1) and the rest is a piece of cake).


Bill


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:
email@hidden


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]
______________________________________________________________________ ____




--
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


References: 
 >Sample rates and AUGraphs (From: Robert Grant <email@hidden>)
 >Re: Sample rates and AUGraphs (From: William Stewart <email@hidden>)
 >Re: Sample rates and AUGraphs (From: Robert Grant <email@hidden>)

  • Prev by Date: Re: Sample rates and AUGraphs
  • Next by Date: Virtual CoreMidi port testing/validation?
  • Previous by thread: Re: Sample rates and AUGraphs
  • Next by thread: AirTunes API and DTS
  • Index(es):
    • Date
    • Thread