Re: Initialize, Cleanup, State
Re: Initialize, Cleanup, State
- Subject: Re: Initialize, Cleanup, State
- From: Art Gillespie <email@hidden>
- Date: Mon, 12 Dec 2005 12:36:39 -0700
If it *is* correct, where would this leave loaded samples? Should
a plug-in unload them on Cleanup() and reload during Initialize()?
The documentation for Cleanup ("This function may be used to
return an Audio Unit to its uninitialized state, causing it to
release resources without closing the component") suggests that it
should, but that seems like a lot of heavy lifting for a simple
sample rate change.
<snip>... - we did add a menu item in AU Lab to Uninitialize the
session for this reason and we've hoped that developers are testing
against this (there have been several emails on this list about
this topic).
I've been getting a lot of use out of that feature in the past 24
hours. It's a terrific debugging aid. Thanks for providing it.
(3) When an AU is closed its cleanup call is made (either by the
implementation or by the host explicitly calling AudioUnitUninitized)
Basically, you don't know the reason for the change or when (or
even if) the Initialize call will follow, so you can't assume it.
I see. So if I'm reading you right, the answer to my question is
"Yes, you should unload samples in Cleanup() and if there's a
subsequent call to Initialize() make sure you can put everything back
exactly as it was before the call to Cleanup()"
Also, I found it difficult to nail this whole subject down: the
aforementioned documentation didn't turn up any mention of
maintaining state across these calls, and neither did grepping the
CoreAudio SDK headers and source. Is there a Single Point Of
Truth somewhere that I'm missing or is this aspect of the Audio
Unit specification more of an Oral Tradition thing?
Its been a part of auval since its inception, and discussed on the
list many times.
Thanks--I've been piecing it together from these very discussions
(and my dim recollection of our discussion at last year's NAMM). I
just thought maybe I'd missed something in the documentation or headers.
Best,
Art
_______________________________________________
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