Re: Private *properties* for AUs? (not parameters)
Re: Private *properties* for AUs? (not parameters)
- Subject: Re: Private *properties* for AUs? (not parameters)
- From: Urs Heckmann <email@hidden>
- Date: Sun, 30 Nov 2003 11:45:37 +0100
Am Sonntag, 30.11.03 um 11:24 Uhr schrieb Urs Heckmann:
Next would be retrieving a property:
UInt32 sizeSomeData = sizeof( someData );
someData mySomeData; // this will be filled with the stuff
ComponentResult err = AudioUnitGetProperty(
theComponentInstanceOfTheAU,
someDataProperty,
kAudioUnitScope_Global,
0,
&mySomeData,
& sizeSomeData );
Now you can check for size, dump err and all...
OOPS!
I forgot the GetProperty part... sorry...
ComponentResult yourAUClass::GetProperty (
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData,
{
if ( inID == someDataProperty && inScope == kAudioUnitScope_Global &&
inElement == 0 )
{
const someData* myNewSomeData;
myRetrievingSomeData = static_cast<const someData *>(outData);
// we assume you have a someData myStoredSomeData anywhere defined
memcpy( myRetrievingSomeData, &myStoredSomeData, sizeof( someData ) );
return noErr;
}
// or which base ever you derive from
return MusicDeviceBase::GetProperty(inID, inScope, inElement, outData);
}
Cheers,
;) Urs
urs heckmann
email@hidden
www.u-he.com <- Zebra Audio Unit comming soon
_______________________________________________
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.