Re: parameter persistence and view?
Re: parameter persistence and view?
- Subject: Re: parameter persistence and view?
- From: William Stewart <email@hidden>
- Date: Wed, 15 Apr 2009 10:39:50 -0700
On Apr 14, 2009, at 6:01 PM, 除村 武志 wrote:
On 2009/04/15, at 4:12, William Stewart wrote:
On Apr 13, 2009, at 8:31 PM, 除村 武志 wrote:
Thanks for the answer, Bill.
Do you mean that It's necessary to add some codes to refresh the
view
in overridden RestoreState?
nope - the view will find this out because the host will tell it
that the parameters have changed when it sets a preset
That's a good news for me.
But as far as using AULab or Garageband, the view is restored as
well.
Is it just because these hosts are too nice?
that means they are doing the right thing. If logic isn't, then
that could be a bug there, but this would surprise me as this is
not a reported problem with other audio units is it?
No, no such problem occurs with other plug-ins.
One thing I'm concerned about is
I haven't written any explicit codes
to refresh the view to reflect current parameter values
(because my plugin doesn't have to change parameters by itself).
Do you think it's related to my problem?
If you are using the parameter mechanism that is provided with AUBase
(if you have a look at the example audio units you will see that we
set parameter values in the constructor, then use the GetParameter
calls to get those values), then you should be fine.
If however, you are keeping your own instance variables in your
subclass to represent the parameter values, then you will have
problems with the Save and Restore State calls unless you also overide
those calls in your subclass. From what I can make out, it is possible
that you are doing this and thus this is the cause of your problems.
The SampleEffectUnit has comprehensive code for establishing the
parameter values, reporting their range, etc. As does the volume
example that is posted to apple's developer web site (but I'm not
exactly sure where to get that from)
Bill
_______________________________________________
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