• 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: Changing Audio Units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing Audio Units


  • Subject: Re: Changing Audio Units
  • From: William Stewart <email@hidden>
  • Date: Thu, 10 Apr 2008 12:02:52 -0700


On Apr 9, 2008, at 8:25 PM, Timothy Bolstad wrote:
I'm wondering if there is an easy way to change an Audio Unit
in a running AUGraph in such a way that the AUNode retains its connections to
other nodes.

nope



Or, is the way to do this to store all of the connections,remove
the node, call AUGraphNewNode, and re-connect the new node.

yes

you can have the new node added to the graph before you remove the old one. You can actually swap this in and out by careful management:

Set up your new node:
- make sure it has the same formats, same ins/outs, etc as the existing one you want to replace. After you have set it up, initialise it. (AudioUnitInitialise)
call AUGraphRemoveNode (yourOldNode)
make all of the connections you want to your new node
call AUGraphUpdate

at this point (you can see this before and after you call AUGraphUpdate with CAShow(myGraph)) you have just queued up all of the removals, reconnections, but they aren't actually applied in a running graph until you call AUGraphUpdate - that is the signal to the graph to do the connections, etc, that you need. By initialising the audio unit you want to add first, you are ensuring that this new audio unit is both:
(1) able to replace your existing one in that configuration
(2) doing its work of allocation, etc off the render thread, so when you actually do connect it in, its a lightweight operation


Bill



Thanks,
Tim
_______________________________________________
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

_______________________________________________ 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: 
 >Changing Audio Units (From: Timothy Bolstad <email@hidden>)

  • Prev by Date: Re: Offline Audio Units
  • Next by Date: Re: ExtAudioFile calls --need PCM data example
  • Previous by thread: Changing Audio Units
  • Next by thread: Finding a users Music folder
  • Index(es):
    • Date
    • Thread