Matrix Mixer and AUGraph tidbit
Matrix Mixer and AUGraph tidbit
- Subject: Matrix Mixer and AUGraph tidbit
- From: James Coker <email@hidden>
- Date: Thu, 15 Jan 2004 20:24:48 -0700
I just found out that if I want to create a MatrixMixer AU and add
it to a running AUGraph, I need to manually call AudioUnitInitialize on
the
mixer before adding it to the graph, otherwise it does nothing.
The general order I'm using is:
- create the MatrixMixer
- configure it's inputs and outputs (as in the MatrixMixerTest example)-
- initialize it
- connect it to other AUGraph nodes
- enable it's inputs/outputs as needed
- setup all volumes
Based on the comments by Bill in the message below, I don't think this
is a bug, but wanted to point it out.... (Glad I saved this message!)
Cheers,
Jim
On Oct 6, 2003, at 4:19 PM, William Stewart wrote:
AUGraph doesn't make these decisions.
The errors are being returned by the AU you are connecting too (the
connection semantics are enforced by the AU - ie. the connection needs
to have the same format from output to input - if that format is
invalid then the connection will return an error). Its left to the
user of the graph to ensure that the connection will be valid and to
deal with it when it isn't.
We modified this behaviour between Jaguar and Panther given the
discussions we'd had about AU's and format negotiation (ie. can't
generally reset formats if the AU is initialized) - so the AUGraph
code's order of operations was modified to reflect this semantic.
Thus, now, the AUGraph will *not* initialize an AU until it is
involved in a connection, and it will initialize the AU *after* the
connection is made. Obviously, as a connection can involve both input
and output sides, this is not foolproof. Also, if the graph is
running, this connection/initialization will be made on the render
thread - generally not a good idea.
So the general advise is, make sure the formats are correct and the AU
is initialized before connecting it to a playing graph. (That also
allows you to determine if the AU can become a member of the graph at
the location, etc, you want it to be).
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.