• 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: Matrix Mixer and AUGraph tidbit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matrix Mixer and AUGraph tidbit


  • Subject: Re: Matrix Mixer and AUGraph tidbit
  • From: James Coker <email@hidden>
  • Date: Fri, 16 Jan 2004 13:38:33 -0700

After further testing, I find that I need to amend my prior comment:

In addition to manually calling AudioUnitInitialize on a
MatrixMixer before adding to an *already running* AUGraph,
I also have to create that MatrixMixer (via AUGraphNewNode)
*before* I start the AUGraph.

Since I haven't seen this with any other AUs, I have to
ask: "What is going on here? Is this due to setting up
I/O streams for the MatrixMixer, or is there some critical
semantic about the AUGraph that I have missed?"

Thanks,
Jim

On Jan 15, 2004, at 8:24 PM, James Coker wrote:

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.

  • Follow-Ups:
    • Re: Matrix Mixer and AUGraph tidbit
      • From: William Stewart <email@hidden>
References: 
 >Matrix Mixer and AUGraph tidbit (From: James Coker <email@hidden>)

  • Prev by Date: Re: reading audiofile into floatbuffer
  • Next by Date: test <eom>
  • Previous by thread: Matrix Mixer and AUGraph tidbit
  • Next by thread: Re: Matrix Mixer and AUGraph tidbit
  • Index(es):
    • Date
    • Thread