• 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: AudioDevice Callback Frequency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioDevice Callback Frequency


  • Subject: Re: AudioDevice Callback Frequency
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 17 Oct 2007 14:02:13 -0700

Ah, well that's a horse of another color. If you are in control of the app, then you can have the app set the IO buffer size for your device using kAudioDevicePropertyBufferFrameSize.

On Oct 17, 2007, at 11:27 AM, Nick Nallick wrote:

I'm using a combination of a user space app and a driver to collect the machine's audio output. On the client side I've set up an AudioDevice callback to collect the bit stream, format it, and send it. How does my client app change the buffer size that I'm getting in my callback function?

Thanks,
Nick

On Oct 15, 2007, at 7:11 PM, Jeff Moore wrote:

Basically, the answer to your question is no. The driver has no influence over the IO buffer size a client in user-space might choose.


On Oct 4, 2007, at 10:13 AM, Nick Nallick wrote:

I'm using a driver very similar to the AudioReflector sample to capture the machine's audio output, package it and send it to external hardware for output. Functionally this is similar to what Airport Express does. My hardware device expects 40 ms packets of audio sampled at 22.05 kHz (i.e., 882 samples per packet). My experience is that my AudioDevice callback is being called with 256 samples at a time (i.e., 11.61 ms at 22.05 kHz). I'm currently accumulating this data into 40 ms packets and sending it. Unfortunately this introduces some latency since I generally have to wait longer than 40 ms for that much data (e.g., the first packet is delayed by 6.44 ms but this varies).

Is there any way to tell CoreAudio how often to call my callback, or some better way to do this?


--

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: 
 >AudioDevice Callback Frequency (From: Nick Nallick <email@hidden>)
 >Re: AudioDevice Callback Frequency (From: Jeff Moore <email@hidden>)
 >Re: AudioDevice Callback Frequency (From: Nick Nallick <email@hidden>)

  • Prev by Date: Basic CoreMIDI setup (was Re: Coreaudio-api Digest, Vol 4, Issue 283)
  • Next by Date: AudioFileOpenWithCallbacks() bug
  • Previous by thread: Re: AudioDevice Callback Frequency
  • Next by thread: How to get AU in Mono-Stereo menu?
  • Index(es):
    • Date
    • Thread