• 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: RemoteIO callback buffer length wonky on iphone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RemoteIO callback buffer length wonky on iphone


  • Subject: Re: RemoteIO callback buffer length wonky on iphone
  • From: Doug McCoy <email@hidden>
  • Date: Tue, 27 Apr 2010 09:16:44 -0700

Chris,

My issues were on the device. It turns out that I was incorrectly using a Float32 value when setting the hardware sample rate. When I switched to a Float64 value, the behavior was as expected regarding the callback inNumberFrames.

I do recall having some issues in the simulator with inNumberFrames at fs=16000. I do not think I ever resolved them, since the device is really what mattered in my case. At 44k and 22k i never had issues with inconsistent buffer length. There is an issue explained previously in this forum in which the simulator will basically ignore the setting and getting of the hardware buffer duration. In the simulator, you can set the preferred buffer duration and verify the request by checking the actual buffer duration, but this value may not correlate to the actual inNumberFrames of the callback. Again, this is only for the simulator. On device these values were always respected.

Hope this helps.

Doug



---
Check out my new iPhone app, FlipTalk. Once featured on the iTunes App Store "What's Hot" list!
http://fliptalkapp.com
http://itunes.com/apps/FlipTalk/
http://tinyurl.com/FlipTalkYoutube





On Tue, Apr 27, 2010 at 7:51 AM, Chris Adamson <email@hidden> wrote:
I just started encountering a similar problem to this today.  I'm taking some example code that I used for a Core Audio conference presentation.  This example applies a simple gain to samples pulled from remote i/o's mic input.  Trying it today at home, I found that I'm getting inNumberFrames == 706 on the first callback, and inNumberFrames == 1 (or sometimes 2) on all subsequent callbacks.

This problem only appears in the simulator, not on the device (where I always get inNumberFrames == 1024).

Moreover, I think the problem is only with USB input devices.  If I plug my iPhone headphones into my MacBook and use the clicker-mic, it's fine (inNumberFrames == 512).  Using a Logitech USB headset shows the problem on MacBook and Mac Pro, and I also have the problem using a MacAlly iMic USB audio adapter on the Mac Pro.

Doug, were you using USB input devices for this?

I've pasted the relevant view controller's code to <http://pastie.org/937276>.  To replicate, your GUI needs a "start" button that calls this VC's handleStartTapped, and a UISlider (range 0.0 to 1.0) whose valueChanged action is connected to handleSlider1ValueChanged.

Let me guess, my next stop is http://bugreport.apple.com/ , right?

--Chris


 _______________________________________________
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: 
 >RemoteIO callback buffer length wonky on iphone (From: Doug McCoy <email@hidden>)
 >Re: RemoteIO callback buffer length wonky on iphone (From: Chris Adamson <email@hidden>)

  • Prev by Date: Re: RemoteIO callback buffer length wonky on iphone
  • Next by Date: Re: Capturing currently played audio using CoreAudio on Mac
  • Previous by thread: Re: RemoteIO callback buffer length wonky on iphone
  • Next by thread: Unknown error message
  • Index(es):
    • Date
    • Thread