Re: AULab set properties before initializing
Re: AULab set properties before initializing
- Subject: Re: AULab set properties before initializing
- From: Daniel Jalkut <email@hidden>
- Date: Thu, 16 Mar 2006 13:38:05 -0500
Thanks, Bill. That definitely puts things into perspective for me. I
will stop treating Initialize as the beginning of the world as I know
it :)
Daniel
On Mar 16, 2006, at 1:28 PM, William Stewart wrote:
On 16/03/2006, at 9:01 AM, Daniel Jalkut wrote:
In debugging my AudioUnit, I've used AULab quite a bit. I notice
something unusual and wanted to get some feedback about whether my
concerns are off-base or not.
When I open a document in AULab where my instrument has previously
been saved in a track, I notice that AULab sends me a
"kAudioUnitSetPropertySelect" (specifically to restore a preset)
before it sends me a kAudioUnitInitializeSelect. Instinctively
this seems like a bug in AULab, but I wonder if this is something
I need to be prepared for in general?
No. There is no requirement that this occurs in any order. The
implementation for state preservation in AUBase is completely
independent of whether the AU is initialised or not. And, auval
will actually test this case as well.
Right now I rely on structures being in place that are not created
until my unit is initialized. If this kind of thing is widespread
I figure I'll have to queue the property settings until I'm
initialized, or else prematurely self-initialize when I get such a
property setting.
You could queue this - just call CFRetain on the incoming aupreset
dictionary and keep it around. You would need to make sure that
NONE of your parameter values can be set before you can be
initialised (because the preset would overide them of course). If
param values can be set, then you probably should initialise the
structures that you need too apply the preset.
Bill
Thoughts? Much appreciated!
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
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