Re: plug-in GUI refresh problem in Logic
Re: plug-in GUI refresh problem in Logic
- Subject: Re: plug-in GUI refresh problem in Logic
- From: William Stewart <email@hidden>
- Date: Mon, 26 Jul 2004 10:40:42 -0700
On 24/07/2004, at 2:02 AM, Urs Heckmann wrote:
>
Hiya,
>
>
my stuff relies on Parameter Changed Notifications upon preset
>
changes. Maybe they're not fired? (For me, changing a preset is just a
>
massive parameter change orgy...)
>
>
Dunno how Generic view handles this, and I couldn't find that in the
>
source code, maybe it also refreshes control states upon PresentPreset
>
or something.
>
>
Oh, in early versions of CAUGui stuff I called myAU::SetParameter()
>
for each parameter whithin myAU::RestoreState(), but now I use
>
AudioToolboxes AUParameterSet() which generates the needed Parameter
>
Notification...
Your AU should not be doing this. The intention here is that these
calls are for the *clients* using Audio Units, not Audio Units
themselves. the AU just does itself, and in general notifying external
clients that something has changed is *not* its responsibility. Now,
what if the setting of a parameter causes other parameters to change?
Mark that parameter as a "Meta" parameter - the listener will take care
of that too (but I digress)
As Stefan's email noted, you are working around a bug in Logic.
AudioUnitHosting, after having set the preset on the AU, then does this
(from Marc's Email):
>
You could try adding something like this to the end of RestoreState():
>
>
AudioUnitParameter dirtyParam;
>
memset(&dirtyParam, 0, sizeof(dirtyParam));
>
dirtyParam.mAudioUnit = GetComponentInstance();
>
dirtyParam.mParameterID = kAUParameterListener_AnyParameter;
>
dirtyParam.mScope = kAudioUnitScope_Global;
>
dirtyParam.mElement = 0;
>
AUParameterListenerNotify(NULL, NULL, &dirtyParam);
>
>
Marc
But Marc's suggestion to do this at the end of RestoreState is *also* a
workaround to Logic's bug.
As AUHosting does, this should be done by the host, not by the AU.
You'll find that there, your UI will update correctly when a preset is
set.
Bill
>
>
Hope this helps,
>
>
;) Urs
>
>
Am 24.07.2004 um 10:24 schrieb Os:
>
>
> I wondered if anyone else has come across (and ideally solved) this.
>
>
>
> My AU GUI works fine in Logic, except that when switching between
>
> stored presets ('Settings' in Logic-speak) the GUI does not refresh.
>
> If I switch to the generic controls view, I can see the parameters
>
> changing when I switch presets - but not when my custom GUI is
>
> visible.
>
>
>
> My GUI's based on Urs's SDK, but on the old pre-1.3.1 version, if
>
> that helps.
>
>
>
>
>
> cheers,
>
> os.
>
>
>
> email@hidden
>
> http://www.collective.co.uk/
>
> _______________________________________________
>
> 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.
>
_______________________________________________
>
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.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
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.