Re: AUValidation
Re: AUValidation
- Subject: Re: AUValidation
- From: Marc Poirier <email@hidden>
- Date: Tue, 30 Dec 2003 12:15:58 -0600 (CST)
On Tue, 30 Dec 2003, stiwi kirch wrote:
>
Yes, yes, yes, stupid me. Never ever assume that a data-structure is
>
initialized properly. In this case buzZer is not jet initialized
>
properly but is already receiving a call by AUV. I did not expect that
>
any host would call Filter::reset() before BuzZer::Initialize(). But
>
ok. You never know until you know, you know. ;)
Well, no host can possibly call Filter::reset(). It is more a string of
calls that leads to that, from your own code. What the crash log was
showing was that the host was setting the ClassInfo property, which leads
to a call (via the AUBase SDK) to RestoreState(), and from there you were
making calls to SetParameter(), and in there you made a call to
Filter::reset(). So the mistake was assuming that calls to SetParameter()
or RestoreState() would not occur unless the AU was Initialized.
Initialization is only intended to prepare resources needed for DSP
rendering, not for preparing the AU for general property and parameter
setting and getting. The AU should be prepared for that stuff whether
Initialized or not.
>
Now buzZer does not crash AUV anymore but there is still one error.
>
ERROR: Parameter did not retain set value when Initialized. I think
>
that's what Urs is referring to.
>
>
[quote] - during Initialize, no parameter values must be changed
>
[/quote]
>
>
Is there a proper procedure to handle this problem?
Well... don't change parameter values during Initialize(). ;) Without
knowing what exactly you are doing in your Initialize() implementation,
it's hard to say much more than that.
Marc
_______________________________________________
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.