Re: Components
Re: Components
- Subject: Re: Components
- From: Marc Poirier <email@hidden>
- Date: Fri, 14 Feb 2003 13:42:56 +0100 (CET)
>
I'm still struggling with the concept of Components, but I haven't
>
found the answer to a basic question in the docs:
If you find the time, I would recommend reading a bit of the Component
Manager docs. It's not critical to understand that underlying technology
in order to create AUs, but it is enlightening and useful to understand, I
think.
>
I understand you can use an AudioUnit to query properties of an
>
AudioUnit instance (a ComponentBase). Is it possible to retrieve a
>
reference to the instance from an AudioUnit? What I'm wondering is: is
>
it possible to invoke methods on an AudioUnit instance from a view? Or,
>
is the connection between the view and the AudioUnit instance
>
intentionally restricted to properties and parameters?
The model in place is that the DSP component knows nothing about the GUI
component and the GUI component receives a Component Manager instance ID
for the plugin. This is different than a pointer to the AUBase object or
anything like that. And yes, the deal with Component Manager calls is
that they are all property setting/getting/querying. One of the
advantages is that this allows you to run the two components in separate
address spaces (like separate computers) and the Component Manager
resolves calls between the two. Using pointers to class instances would
crash badly in those cases. And the advantage with having the DSP
component exist without any awareness of the GUI component is that it is a
safe design, since the GUI can come and go at any time.
If you want to see some example code, you should check out the
dfx-library/dfxplugin*.* and dfxgui_mac/dfxgui.* files in our cvs
repository. There are a bunch of custom properties implemented (like
things for randomizing parameters, setting up MIDI learn, getting and
setting parameter values according to a value distribution curve, etc.)
and then corresponding convenience methods in the GUI class (which do the
more wordy Component Manager property calls). If you look at Buffer
Override's sources, you'll also see some stuff on how to set up special
parameter listeners and property listeners and react to those changes.
Marc
_______________________________________________
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: | |
| >Components (From: Glenn Olander <email@hidden>) |