• 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: Input callback only getting called every couple of seconds.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input callback only getting called every couple of seconds.


  • Subject: Re: Input callback only getting called every couple of seconds.
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 8 Dec 2006 14:33:40 -0800

As far as I can tell, my iSight only supports a sample rate of 48K. So, I'd expect that you'd get a kAudioDeviceUnsupportedFormatError error trying to set the sample rate to 8K. Did you get an error? If not, you should file a bug. The proper work around would be to ask the device for it's list of supported sample rates and pick one from the list.

In fact, you might want to do that anyway in the name of being compatible with lots of input devices rather than just assuming the rate you want is supported. Very few devices are going to support a sample rate of 8K these days.

On Dec 8, 2006, at 2:10 PM, Bill Cunning wrote:

I have run into something interesting, and I don't have a clue where to
start looking for the problem.
I am capturing voice from mic, and after some initial flailing about
(coming from windows) I got it all working with a usb headset/mic.
Yesterday I hooked up an isight camera/mic combination, and ran into
this problem.
As I set up the audio unit, everything works without error except the
call to set default sample rate
--AudioDeviceSetProperty(id, 0,0,1,kAudioDevicePropertyNominalSampleRate,
size,&rate) where rate = 8000. I expected this and will downsample the
captured audio to get it to the desired sample rate. Continued setup of
the device all appears to work fine (err always = 0 on the various
calls) and the mic does appear to capture data, the problem is that the
input callback is only getting called about every 1.8 seconds, but the
buffers only contain about 16 ms of data. If I switch back to the
headset mic id and restart, the callback is called as expected.
I expect I am missing something obvious here, but I can't see it :)


--

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: 
 >Input callback only getting called every couple of seconds. (From: "Bill Cunning" <email@hidden>)

  • Prev by Date: Input callback only getting called every couple of seconds.
  • Next by Date: Re: Issues with Intel Macs and writing MIDI files from MusicSequence
  • Previous by thread: Input callback only getting called every couple of seconds.
  • Next by thread: Re: Issues with Intel Macs and writing MIDI files from MusicSequence
  • Index(es):
    • Date
    • Thread