• 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: AU2 - another lesson - GetSampleRate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU2 - another lesson - GetSampleRate


  • Subject: Re: AU2 - another lesson - GetSampleRate
  • From: Doug Wyatt <email@hidden>
  • Date: Thu, 3 Oct 2002 16:24:44 -0700

There's a way to work around this by calling, from the constructor, whatever it is in Initialize that creates the elements ... I'd go look and tell you what it is, but won't because it's better to do as little work as possible in the constructor and wait until Initialize time. This allows a plugin to be opened and queried as to its capabilities, allowing the host to decide whether it wants to use it, before the plugin allocates a lot of resources.

Doug


On Tuesday, Oct 1, 2002, at 13:39 US/Pacific, Marc Poirier wrote:
Tuesday's lesson: Don't call GetSampleRate during your Audio Unit's
constructor. Of course, if you look at the AUEffectBase implementation of
it, you will see that it is not a good idea because it accesses element 0
which does not exist at the time of your plugin's construction. But if
you're dumb like me, you will not look at that and instead spend a day
cursing the Component Manager for throwing weird exceptions and generally
mucking things up when it's really your own fault for trying to do
something silly...

Marc
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden http://www.sonosphere.com
_______________________________________________
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: 
 >Re: AU HostCallback - musical location (From: Bill Stewart <email@hidden>)

  • Prev by Date: Yet another interface idea
  • Next by Date: Re: AUPresets in Logic
  • Previous by thread: AudioUnitParameterUnit for ms
  • Next by thread: Re: AU HostCallback - musical location
  • Index(es):
    • Date
    • Thread