Re: audio unit deinstantiation thread
Re: audio unit deinstantiation thread
- Subject: Re: audio unit deinstantiation thread
- From: Paul Davis <email@hidden>
- Date: Wed, 13 Jul 2011 11:16:00 -0400
On Wed, Jul 13, 2011 at 10:54 AM, Olivier Tristan
<email@hidden> wrote:
> So the backend doesn't know anything about the GUI but still you ask the
> plugin to know about its UI ?
An AU plugin has no idea about its UI. It only knows about
ParameterListeners and the like. AU has a strict separation of plugin
and view. The view could even be running in a different process, or
even on a different machine.
> Killing the engine before its UI is like killing a server before its client.
it not even remotely like that because the host doesn't kill the
plugin, it says "I am finished with you". the last thing to say "i am
finished with you" is the one that causes "closing" the plugin.
having said all that, in looking over the code again, i notice that
actually, Ardour/Mixbus doesn't even quite do what i described. or it
does, but the details matter:
* as the ARDOUR::Plugin object is destroyed, it emits a signal to tell
the GUI that its being destroyed
* the GUI wraps up its business, which includes destroying the plugin view
* the Plugin object continues its destruction, which includes an
Uninitialize() call to the plugin and ultimately ends with the
Component being "closed" (i.e. refcnt is decremented)
so in fact, the view *is* destroyed before the plugin is
uninitialized() and then closed (refcnt decremented). in other words,
just what the OP "wanted":)
--p
ps. in fact, its even more complex than i've described above, because
all the objects i've mentioned are managed via refcnting, but the
order of results is as matched.
_______________________________________________
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