• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?


  • Subject: Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
  • From: Bill Stewart <email@hidden>
  • Date: Thu, 29 May 2003 11:34:34 -0700

Shai

Thanks for the comments - we'll look into this, as yes this call is asynchronous and if there is any data that we need at a later date that we don't have that should be kept around.

However - it is my understanding that we are already doing this (but we'll check) - if we think we are and we're still crashing, then your workaround shouldn't be required and it would suggest that that workaround would be masking another problem...

Thus - if there is anyway you can send us some code that would reproduce the problem that would help tremendously - I'll let you know...

On Thursday, May 29, 2003, at 07:31 AM, Shai Shasag wrote:

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.

"audio thread" in this case means the thread that your AudioUnitRender call has been made on.

Bill


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.


-- 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
________________________________________________________________________ __
_______________________________________________
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.
References: 
 >Conclusion: Can anyone comment on Crashes in AUParameterSet? (From: Shai Shasag <email@hidden>)

  • Prev by Date: porting real-time audio capture to OSX
  • Next by Date: AudioConverter sample rate conversion
  • Previous by thread: Conclusion: Can anyone comment on Crashes in AUParameterSet?
  • Next by thread: Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
  • Index(es):
    • Date
    • Thread