Re: AUView opening before initialzation BIG HASSLE!
Re: AUView opening before initialzation BIG HASSLE!
- Subject: Re: AUView opening before initialzation BIG HASSLE!
- From: "Angus F. Hewlett" <email@hidden>
- Date: Tue, 09 Sep 2003 09:36:27 +0100
At 10:20 PM 9/8/2003 -0500, Marc Poirier wrote:
>
On Mon, 8 Sep 2003, Angus F. Hewlett wrote:
>
> Can you not just call Initialize() (or better, an internal initialize
>
> method) from your plug when you run in to a problem? That's what I do in
>
> VST-AU:- if it is possible for it to complete a call without
>
> Initialize()ing, it does so, but if it has to intialize those things, it
>
> does that instead. Equally, in the view class, I don't instantiate anything
>
> big until I need to create and display the view.
>
Are you sure it's okay for the plugin to Initialize itself without the
>
host knowing?
OK, I didn't put that too well... the plug should initialize itself
internally. Whatever baseclass stuff is done by Initialize() should
certainly be left until the host is ready. So in your Initialized, you have
something like:-
CMyAU::Initialize()
{
if (!m_bInitedInternally)
InitInternals();
}
but you can safely call your InitInternals from elsewhere if need be.
A smartly designed plug should not need to do this anyways, but of course
much of the time we're dealing with monolithic legacy code.
>
> The downside of this approach is that it makes host load times a bit
>
> unpredictable... depending on what the host asks for when scanning plugins,
>
> it may take a couple of ms per AU or a few hundred ms (many VST plugins are
>
> slow to load). I could improve performance some more by caching more
>
> information than I currently do (the output configuration is cached; the
>
> audio I/O properties are cached; the parameter table is not).
>
In my opinion, this is not something that you should have to worry about,
>
but a shortcoming of the host when the host is rescanning that information
>
for every AU during every launch.
One of the Apple representatives on the list (Bill, I think) stated that AU
open times to get basic properties should be kept as low as possible, in
the tens of ms. Because of the nature of VST plug-ins (generally
monolithic) and the way VST-AU's loader works (initialize as much as
possible as early as possible, so crappily coded VSTs are less likely to
crash when we ask them questions later), and also because of the way
people tend to hoard those plugs, it makes sense for me to avoid going
through the load sequence at all unless I absolutely have to.
Regards,
Angus.
=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd -
http://www.fxpansion.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.