Re: ClassInfo & PresentPreset confusion
Re: ClassInfo & PresentPreset confusion
- Subject: Re: ClassInfo & PresentPreset confusion
- From: Michael Kleps <email@hidden>
- Date: Mon, 10 Oct 2005 17:03:14 +0200
I don't have ANY au_presets...
So the code you just posted basicly get the current preset (although
I have none?), and then sets the "name" of in my State dictionary to
the name of the preset that shouldn't exist in the first place?
I guess in my restore state I should use a similar method to restore
the name then?
Could someone extend the SimSynth example with a SaveState/
RestoreState method and confirm my finding?
Regards,
Mike
Am 10.10.2005 um 16:50 schrieb Olivier Tristan:
Michael Kleps wrote:
Hi all,
I still get the "WARNING: Preset name is not retained in
retrieved class data" although I don't even have ANY presets! My
plugin has no presets whatsoever, only a state which is retained
perfectly via my SaveState() and RestoreState() implementation.
No property "CurrentPreset" or "PresentPreset" is ever passed to
my "GetProperty" or "SetProperty" methods.
To me it seems that the AU Validation tool has a bug, warning me
about an issue that doesn't exist.
Other then the afforementioned properties, is there any other
method a host could use the change the preset-name?
Hi Michael,
The following code should ease your pain:
// Save the preset name
AUPreset au_preset;
if (DispatchGetProperty(kAudioUnitProperty_CurrentPreset,
kAudioUnitScope_Global, 0, &au_preset) == noErr)
CFDictionarySetValue( dict, kNameString, au_preset.presetName );
Where dict is the current CFMutableDictionaryRef you are using to
save your state.
Hope this helps.
--
Olivier Tristan
Ultimate Sound Bank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40refx.net
This email sent to email@hidden
_______________________________________________
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