Re: AU Validation tool warning
Re: AU Validation tool warning
- Subject: Re: AU Validation tool warning
- From: Pavol Markovic <email@hidden>
- Date: Wed, 28 Apr 2004 07:23:35 +0200
Bill,
I've added this debug code at the end of SaveState method in my
subclass:
#if DEBUG
// test if presetName is retained in SaveData
CFStringRef name = reinterpret_cast<CFStringRef>(CFDictionaryGetValue
(*dict, CFSTR(kAUPresetNameKey)));
CFShow(name);
printf("Saved preset name retain count: %ld\n",
CFGetRetainCount(name));
#endif // DEBUG
and the result is always:
Untitled
Saved preset name retain count: 2147483647
- looks enough :)
The preset name is always the constant "Untitled" string made by CFSTR
in AUBase.
Now I'm confused too and even more.
PM
On 20.4.2004, at 23:54, William Stewart wrote:
Pavol
I'm confused... the preset name is not necessarily related to a
factory preset.
When a preset is saved, the host is required to set one of these two
properties with a name. At that point, the preset number becomes -1
and the AU Preset is saved along with the currently set name in this
member variable. So, when this name is saved, your call to SetFactory
preset won't be called (because you aren't actually setting a factory
preset at that point), but the name of a user preset.
I would suggest debugging your AU whilst its running in the validator,
and see why you aren't returning the name when the validator sets it
before retrieving the preset.
Bill
On 20/04/2004, at 1:43 PM, Pavol Markovic wrote:
On 20.4.2004, at 19:33, William Stewart wrote:
What version of the Apple - CoreAudio SDK are you based on?
I use original Panther SDK, I've compared the AUBase.cpp with the
latest SDK and they are identical in DispatchGet/SetProperty for:
case kAudioUnitProperty_PresentPreset:
case kAudioUnitProperty_CurrentPreset:
I use dynamically generated list - CFArray with callbacks for
retaining and releasing AUPresets.
Any suggestions?
Thanks
Pavol Markovic
On 20.4.2004, at 19:33, William Stewart wrote:
On 20/04/2004, at 2:51 AM, Pavol Markovic wrote:
Yes, a private variable. I thought SDK handles this...
It does, and the SampleEffect Unit that provides factory presets
passes
validation without warnings.
then what should I do? My Save/Restore calls the AUBase methods and
adds/takes new properties (vstdata).
The problem is that the name set when setting either of these
properties:
case kAudioUnitProperty_PresentPreset:
case kAudioUnitProperty_CurrentPreset:
Is not being saved. In the latest releases of the SDK I can see in
the
SetProperty implementation in AUBase how these two are being handled
correctly...
What version of the Apple - CoreAudio SDK are you based on?
Bill
And this is how I handle preset changes:
OSStatus LPAUSynth::NewFactoryPresetSet(const AUPreset& sPreset)
{
VST_PLUGIN_CLASS::setProgram(sPreset.presetNumber);
SetAFactoryPresetAsCurrent(sPreset);
return noErr;
}
Strange thing is, I receive this Warning, even if I don't provide
Factory_Presets property.
Thanks for advice
Pavol Markovic
_______________________________________________
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.