Conclusion: Can anyone comment on Crashes in AUParameterSet?
Conclusion: Can anyone comment on Crashes in AUParameterSet?
- Subject: Conclusion: Can anyone comment on Crashes in AUParameterSet?
- From: Shai Shasag <email@hidden>
- Date: Thu, 29 May 2003 17:31:23 +0300
Hi to all,
It is my conclusion that AUParameterSet IS asynchronous. If you
remember my code was:
const AudioUnitParameter inParameter = {GetComponentInstance(),
lParamID kAudioUnitScope_Global, 0};
OSStatus cErr = ::AUParameterSet(nil, nil, &inParameter, newValue, 0);
&inParameter is a pointer to the stack, and therefor does not live
after the function ends. The crash happened inside memcpy (call from
somewhere in AUParameterSet).
What I did was to create an array of AudioUnitParameter's and placed
it on the heap.
Now the call is:
OSStatus cErr = ::AUParameterSet(nil, nil, inParameterArray +
lParamID, newValue, 0);
Now I do not crash any more.
So I can only conclude that the third parameter is being use after
AUParameterSet returns.
As for calling from the audio thread. If I understand correctly by
'audio thread' you mean the component derived from AUBase. If so this
code is being called from the audio thread and (now) without
problems.
thanks to all who helped,
Shai
_______________________________________________
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.