• 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
reading from the iPhone mic with a small buffer size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading from the iPhone mic with a small buffer size


  • Subject: reading from the iPhone mic with a small buffer size
  • From: Nate <email@hidden>
  • Date: Mon, 24 Nov 2008 07:18:42 -0800

As you may know from my small flurry of posts (sorry), I'm using Audio Unit RemoteIO to read from the iPhone microphone. I am unable to set the buffer size, so I have to just use whatever the default is. The problem is that when I concatenate two buffers, they don't match up perfectly. It appears that I lose some data in between the buffers. I managed to draw the buffers so the phenomenon could be seen:

http://n4te.com/temp/brokenwave.gif

Near the center of the image is where one buffer ends and the next begins. You'll see there that the wave is not smooth.

All I want to do is read from the mic on the iPhone! My requirements are 1024 samples at a 22050 sample rate (or 2048 samples at 44100 since it is easy to ignore every other sample). I tried Audio Queue Services but it internally buffers 8k before invoking my callback multiple times. RemoteIO is complicated with little documentation and doesn't let me set a buffer size and it doesn't respect the sample rate I set. Am I really asking too much from the iPhone? It seems like a reasonably simple task, but I don't seem to be able to solve it by myself.

Does anyone have sample code for reading from the iPhone mic? Any clues at all how to solve this? I'm losing it!

Thanks!
-Nate
 _______________________________________________
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: reading from the iPhone mic with a small buffer size
      • From: "tahome izwah" <email@hidden>
  • Prev by Date: Custom Audio Units on the iPhone
  • Next by Date: Re: iPhone framework conflict causes crash
  • Previous by thread: Re: Custom Audio Units on the iPhone
  • Next by thread: Re: reading from the iPhone mic with a small buffer size
  • Index(es):
    • Date
    • Thread