• 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: kAudioDevicePropertyBufferFrameSize notification in a driver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kAudioDevicePropertyBufferFrameSize notification in a driver


  • Subject: Re: kAudioDevicePropertyBufferFrameSize notification in a driver
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 9 Dec 2004 12:46:03 -0800

Usually, changing the IO buffer size involves reallocating the IO buffers. So, if you aren't careful about when and how you do the reallocation with respect to any other threads that access the buffers, I'd imagine you are setting yourself up for lots of crashes when one of those other threads pre-empts the thread doing the reallocation at precisely the wrong time (which Murphy's Law of Pre-emption says will always happen eventually).

In the IOAudio support, I have any changes that affect what the IO thread is doing synchronize with the IO thread before making the change. The sorts of things that this comes up with include changing the IO buffer size, adding/removing IOProcs, and starting/stopping IOProcs. I'm also very careful to do the right thing when these sorts of changes are made on the IO thread itself.

On Dec 9, 2004, at 7:02 AM, Stéphane Letz wrote:

Hi,

in our driver that implements the AudioHarwarePluIn.h API, we want to implement the kAudioDevicePropertyBufferFrameSize notification.
It is basically working but sometimes applications crash when the buffer size notification is sent.


I quess a driver must stop calling the IO callback while the client is possibly changing its internal state (like changing its internal buffer size...) then start the IO again.

How things should be done to avoid problems?

Thanks

Stephane Letz

_______________________________________________
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


--

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
References: 
 >kAudioDevicePropertyBufferFrameSize notification in a driver (From: Stéphane Letz <email@hidden>)

  • Prev by Date: kAudioDevicePropertyBufferFrameSize notification in a driver
  • Next by Date: Re: kAudioDevicePropertyBufferFrameSize notification in a driver
  • Previous by thread: kAudioDevicePropertyBufferFrameSize notification in a driver
  • Next by thread: Re: kAudioDevicePropertyBufferFrameSize notification in a driver
  • Index(es):
    • Date
    • Thread