Re: AU Cleanup / destructor, what to do in which method?
Re: AU Cleanup / destructor, what to do in which method?
- Subject: Re: AU Cleanup / destructor, what to do in which method?
- From: Chris <email@hidden>
- Date: Fri, 11 Aug 2006 23:41:03 +0200
Thanks,
this wasn't clear in my mind because in the doc, Cleanup is not used,
Uninitialize is used in place (no explicit links between the two).
and in the AUBase code, we have DoInitiaze and DoCleanup with a comment
saying there purpose is to ensure Initialize/Cleanup is called only
once. Should be "Only once after constructor or cleanup" for Initialize
and "Only after Initialize, and only once for Cleanup".
Regards,
Chris
Cleanup is called by the AudioUnitUninitialise API call.
The Destructor is called by closing the audio unit (CloseComponent)
If a host app has to do a format change for instance, then it will
Uninitialise your AU, make the change, and reinitialise your AU.
There are some things you might decide to do when you are first
Initialised (that you would cleanup when you are closed for instance),
but you wouldn't clean these up in the Uninit call (Cleanup)
There's some commentary about the Init/Uninit Open/Close states in the
AU docs: /Developer/Examples/CoreAudio/Documentation/
Bill
On 10/08/2006, at 1:11 PM, Chris wrote:
Hi,
I'm wondering what to do in the destructor of my AU (inheriting from
AUBase) versus what to do in Cleanup method.
If Cleanup is freeing everything, then we don't need to do anything in
destructor.
Is Cleanup always preceding the destruction of the AU (AU lifecycle :
construction/Initialize/Work/Cleanup/Destruction)?
Best regards
Chris
_______________________________________________
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
--mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
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