• 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: proper way to disconnect AUs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proper way to disconnect AUs


  • Subject: Re: proper way to disconnect AUs
  • From: William Stewart <email@hidden>
  • Date: Thu, 20 Jul 2006 17:47:32 -0700


On 20/07/2006, at 5:36 PM, Karim Morsy wrote:

Hi,

I'm connecting and disconnecting nodes in a running graph. I'm trying to figure out what's the right way to do so, as I've experienced some undesired behavior.
Just calling augraph(dis)connect and update does not seem to be enough. for example, when I add and connect AUTimePitch (and update the graph) the CPU load increases from 5% to 30%.
when I disconnect the AU, I thought it was no longer processing any audio data as it has no connections on input or output scope. however, when I disconnect AUTimePitch the CPU load decreases to approximately 20% (should be 5% again, if it was really no longer processing). a bypass on the disconnected AU doesn't change anything either.

Have you called AUGraphUpdate - disconnect (like connect) will not take affect until the graph is updated.


The time pitch doesn't do any work outside of its render call, so once its disconnected it won't do any work.

You can also check on the status of the graph at any time by using CAShow (myGraph) (CAShow is declared in <AudioToolbox/AudioToolbox.h>

Also, AUNetSend keeps listening for connections even after it's disconnected.

Yes - because all disconnection does is remove an AU from a render chain. It doesn't necessarily change the state of the AU. You could Uninitialise the AU after you've disconnected (and update has done its work) - then before you reconnect it, just Initialise it again.


Bill

only if I also remove the node (augraphremovenode()) I achieve the desired result, but I was looking for a way to be able to use a single instance of the au and keep connecting and disconnecting it when needed. this does not seem to be possible (is it ?), instead you have to destroy it and create/initialize a whole new node for the au again, right ?
does the removenode call both unintialize the AU and close the component ?


any information on this issue would be appreciated.

thanks,
Karim
_______________________________________________
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
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: 
 >proper way to disconnect AUs (From: Karim Morsy <email@hidden>)

  • Prev by Date: proper way to disconnect AUs
  • Next by Date: Re: proper way to disconnect AUs
  • Previous by thread: proper way to disconnect AUs
  • Next by thread: Re: proper way to disconnect AUs
  • Index(es):
    • Date
    • Thread