Re: ClassInfo & PresentPreset confusion
Re: ClassInfo & PresentPreset confusion
- Subject: Re: ClassInfo & PresentPreset confusion
- From: Olivier Tristan <email@hidden>
- Date: Mon, 10 Oct 2005 16:50:49 +0200
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:
This email sent to email@hidden