• 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: AUGraph stream format problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUGraph stream format problems


  • Subject: Re: AUGraph stream format problems
  • From: Chris Reed <email@hidden>
  • Date: Mon, 6 Oct 2003 13:48:21 -0500

On Oct 6, 2003, at 11:47 AM, Marc Poirier wrote:

I submitted this with the AppleSeed bugreporter this morning (but it's
happening with non-seed versions of AUGraph, too), but I'm posting it
here, too, just because I'd like to confirm that my description is correct
and also see if anyone else has other ideas of solutions to the problem:


I'm finding a lot of problems with the way that AUGraph handles the
channel layouts of AUs when connecting different AUs together. First,
I'll give you an example scenario:

I have an AU that is strictly 2-out. I load it. Next in the graph chain,
I load an AU that is strictly 1-in/2-out (KTGranulator). Here's some
console.log stuff that illustrates what's happening (a few of the messages
are from KTGranulator, but the rest are from either the AUGraph library or
Numerology):

[snip]

So the result is that there are errors Initializing the AU, but the graph
still tries to render the, and render fails every time, resulting in
silent audio output.


The first mistake is that AUGraph is even attempting to set the number of
input channels to 2. AUGraph should look at the AU's response to the
kAudioUnitProperty_SupportedNumChannels property and then see that the AU
only supports 1-in/2-out. Then, after attempting to set that bogus
format, Initialize fails, of course. AUGraph seems to note the problem,
but continues to try to render anyway, which is the second mistake.

At the very least, if Initialize failed, I think that AUGraph should not
be including the AU in the render chain. I can't imagine that silence is
ever the desirable outcome.

But really AUGraph should look at the SupportedNumChannels and should pay
attention to when its stream format changes fail. Perhaps, in this
example scenario where the previous AU has stereo output and then next has
mono input, AUGraph should throw up a CFUserNotification for the user
explaining that the channel formats don't match and offering either to:
A) mix the first AU's output down to mono, or B) cancel loading the next
AU.


Shouldn't AUGraph just return an error when you try to connect the nodes, or when you start the graph? Like kAUGraphErr_IncompatibleNodeFormats or something. Then the calling code can determine what the best thing to do is (like ask the user).

I don't think AUGraph should be attempting to make decisions about what the right thing to do is. (But clearly, this current behaviour is not the right thing to do.)

-chris
_______________________________________________
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.

References: 
 >AUGraph stream format problems (From: Marc Poirier <email@hidden>)

  • Prev by Date: AUGraph stream format problems
  • Next by Date: Re: AUGraph stream format problems
  • Previous by thread: AUGraph stream format problems
  • Next by thread: Re: AUGraph stream format problems
  • Index(es):
    • Date
    • Thread