• 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
Conclusion: Can anyone comment on Crashes in AUParameterSet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
      • From: Doug Wyatt <email@hidden>
    • Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
      • From: Bill Stewart <email@hidden>
  • Prev by Date: Input and output busses hard coded to 0 in AUEffectBase::Render
  • Next by Date: porting real-time audio capture to OSX
  • Previous by thread: Input and output busses hard coded to 0 in AUEffectBase::Render
  • Next by thread: Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
  • Index(es):
    • Date
    • Thread