Re: AudioUnit write-only parameter (Was: Cocoa Generic View)
Re: AudioUnit write-only parameter (Was: Cocoa Generic View)
- Subject: Re: AudioUnit write-only parameter (Was: Cocoa Generic View)
- From: William Stewart <email@hidden>
- Date: Thu, 2 Jun 2005 10:24:39 -0700
On 02/06/2005, at 6:58 AM, Antoine Misout wrote:
I'm currently adding a parameter which loads an audio file to my
project. I've tried using an indexed parameter with two values: one
for loading a file, the other displaying the file loaded or ' no
file'. This parameter state is always on the second item. Now this
doesn't work since auval will try to set the parameter, which in
turn will pop-up an open file panel, and this isn't good. It also
warns that the parameter doesn't retains its minimum value.
I don't think your AU is the place to be doing this in any case -
really the view code should be doing this work (putting up the UI).
Then you can define a custom property to provide the details of the
file to the AU.
For instance, the DLSMusicDevice has to handle something similar and
it defines a property kMusicDeviceProperty_SoundBankFSRef, in order
for the view to provide the file this AU should be using.
There's also an example of using a custom property in the SDK -
DiagnosticAUs - both examples here.
So I've tried using a write-only boolean parameter, which auval
fortunately doesn't try to play with, which is good. However, it
seems only the generic views from 10.4 supports this: in
particular, Logic doesn't show it. My current workaround is to
force users to use a custom gui, but I'd like to know if there is a
better way.
No, you really need to provide a custom UI for this - the Diagnostic
AUs include the carbon generic view in their UI code.
In Cocoa, the GenericView in Tiger, is an NSView - so if you were to
write a custom view for your AU, you could also embed this
GenericView if that suited your purpose for an interface to the
parameters you published.
Bill
Thoughts?
Thank you,
Antoine
On 25-May-05, at 9:29 PM, William Stewart wrote:
Both the Carbon and Cocoa Generic Views also have some special
behaviours now for Boolean Parameters:
Read Only - puts up an indicator that "lights up" when the value
is set to on, and off when off
Write Only - provides a "push button" to hit this parameter with
(the param is considered to have no state - think of a button to
reset an AU)
Read/Write - checkbox as it does currently
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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