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

Re: Audio Units - newbie questions


  • Subject: Re: Audio Units - newbie questions
  • From: Marc Poirier <email@hidden>
  • Date: Wed, 12 Oct 2005 10:01:50 -0400

On Oct 12, 2005, at 6:17 AM, Muon Software Ltd - Dave wrote:

You really shouldn't be overrunning the host's determination of the
AUs Initialization state. It is the host's choice, and the host
needs to be able to know and depend on the state being as it has set it.

It seems likely to me that the only way I'm going to solve the problem is in
one of two ways:


1. Do all my initialisation in the constructor

OR

2. Leave the initialisatin in Initialize, but put checks to see if the synth
is initialised in all methods that I don't want calling before I the plugin
is ready (such as reset) and quietly ignore those calls.

If Reset is the only thing that your synth can't do while Uninitialized, then certainly go ahead and put a check in there and ignore it if Uninitialized. That's totally fine. And probably then it would be wise to do what you do in your Reset method during your Initialize method, after finishing the init stuff. Cuz the worst thing that I can think of is that the host may think it's Resetted you when actually you did nothing in response to that request, but as long as you "catch up" before rendering any audio, that would be fine.


The real problem is with AUs that will not provide basic functionality when Uninitialized, AUs that will return errors or crash if the host tries to get ParameterInfo, set parameters, get FactoryPresets, etc. before the AU is Initialized. That sort of stuff, you must be able to do. That's the whole point of the 2 states in AU. It allows for a lighter creation state of an AU where you can find out everything about it, and set it up for any sort of operation, but you just can't expect it to render audio and have DSP resources all ready until you Initialize it.

By the way, I did make one mistake when I wrote this:

Uninitialized = ready for anything except audio rendering
Initialized = ready for anything

I should have written this:

Uninitialized = ready for anything except audio rendering
Initialized = ready for anything, except stream format changes

And by "stream format changes," I mean things like StreamFormat obviously, plus SampleRate, BusCount, MaxFramesPerSlice, etc. Although disallowing those things when Initialized is optional. It is the default implementation in AUBase to reject those changes when Initialized, but if your AU can handle those changes no problem and you want to allow that, you just override the appropriate AUBase methods to allow that.


No idea which is the lesser of two evils. Certainly, if my synth is not
fully initialised it would still be able to display its editor, receive
parameter changes etc. but it wouldn't be able to render anything, so in
that it sounds like it meets the spec.

Yes, that sounds good.


It is however sensitive to being
reset before it is initialised as this was a case that wasn't previously
possible in any VST host. It seems to me that option 2 is the way to go.

Hmmm, given that there aren't really any direct equivalents of the Initialize, Uninitialize, and Reset trio in the VST API, I'm not sure what you mean...



Marc _______________________________________________ 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
  • Follow-Ups:
    • RE: Audio Units - newbie questions
      • From: "Muon Software Ltd - Dave" <email@hidden>
References: 
 >RE: Audio Units - newbie questions (From: "Muon Software Ltd - Dave" <email@hidden>)

  • Prev by Date: Re: Audio Units - newbie questions
  • Next by Date: RE: Audio Units - newbie questions
  • Previous by thread: RE: Audio Units - newbie questions
  • Next by thread: RE: Audio Units - newbie questions
  • Index(es):
    • Date
    • Thread