Re: bug in VST2AU SDK, was: Re: AUValidation Error
Re: bug in VST2AU SDK, was: Re: AUValidation Error
- Subject: Re: bug in VST2AU SDK, was: Re: AUValidation Error
- From: Urs Heckmann <email@hidden>
- Date: Tue, 14 Sep 2004 00:25:41 +0200
Hiya,
well, it's quite obvious when you actually *use* dictionaries (once you
start using them, you use them pretty often...)
If you don't specify the callback, you can still fill up a dictionary,
but you can't get values for keys...
However, there's no need to create a dictionary by yourself. The
typical subclass implementation of AUBase::SaveState() would start like
this:
ComponentResult myAU::SaveState( CFPropertyListRef * outData)
{
ComponentResult result = AUBase::SaveState(outData); // or
MusicDevice, etc.
if (result != noErr)
return result;
// now add your own stuff
return noErr;
}
AUBase does it for you, and like ALL methods derived from the SDK
classes (as far as I've seen, that is), one should always call the
super class implementation.
(In this case it also fills in the tricky stuff, like CompSubType etc.
- I wondered why this came up recently at all when certain CFTypes were
wrong, I guess it must have been the same homegrown problem...)
Cheers,
;) Urs
Am 13.09.2004 um 20:46 schrieb Stefan Gretscher:
Hi all,
last week Bill Stewart has found a problem in our AUs and it's also in
the VST2AUSDK, maybe it strikes with your AUs too:
When creating the dictionary for the settings plist in SaveState(),
instead of dong this:
*ptPLRef=CFPropertyListRef(CFDictionaryCreateMutable(kCFAllocatorDefaul
t, 0, NULL, NULL));
the AU must provide the proper CF object memory handling callbacks
like this:
*ptPLRef=CFPropertyListRef(CFDictionaryCreateMutable(kCFAllocatorDefaul
t, 0, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks));
Everybody who uses the old VST2AU SDK must correct this section of the
code.
Even if you don't use that SDK, it may be worth checking how your code
behaves there.
Best,
Stefan
_______________________________________________
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