• 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: AudioDeviceStop and ioProc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioDeviceStop and ioProc


  • Subject: Re: AudioDeviceStop and ioProc
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 11 May 2006 16:01:08 -0700

The answer to the re-posed question is no. You cannot make the assumption that if you call AudioDeviceStop() from some thread context other than the IO thread that the IOProc won't be called any more when AudioDeviceStop() returns. Off hand, I can think of a few very exceptional/coincidental MP situations where this just isn't going to be true and you will get at least one more call.

Let me say this clearly so that there is no misconception: The only way to get guaranteed behavior from AudioDeviceStop() is to call it on the IO thread. The guarantee that is given is twofold. First, the IOProc being stopped will never get called until Start() is called again. Second, any output data supplied in that final call to the IOProc will get sent to the hardware.

If you call AudioDeviceStop() from any thread other than the IO thread, there are _no_ guarantees about how many more times the IOProc will get called while AudioDeviceStop() is executing and after it completes. It won't be a lot of calls, but the exact number of them is not knowable ahead of time.

On May 11, 2006, at 3:39 PM, B.J. Buchalter wrote:

Hence, the behavior of AudioDeviceStop() cannot be guaranteed except
when you are calling it from the IO thread.


I don't think he is asking if there will be no more IOProc calls after
AudioDeviceStop() is called.

I think he is asking if there is a guarantee that there will be no more
IOProc calls after AudioDeviceStop() has returned.


It seems like the answer to this second question is yes from what you have
written, but I am not 100% sure.


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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
  • Follow-Ups:
    • Re: AudioDeviceStop and ioProc
      • From: Steve Checkoway <email@hidden>
    • RE: AudioDeviceStop and ioProc
      • From: "Tim Dorcey" <email@hidden>
References: 
 >Re: AudioDeviceStop and ioProc (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: RE: AudioDeviceStop and ioProc
  • Next by Date: RE: AudioDeviceStop and ioProc
  • Previous by thread: Re: AudioDeviceStop and ioProc
  • Next by thread: RE: AudioDeviceStop and ioProc
  • Index(es):
    • Date
    • Thread