Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-22-2008, 03:34 PM   #1 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 2
incaiphone is on a distinguished road
Default AudioToolbox and mic callback time

Hi;
I just wrote a modified version of the SpeakHere sample ( a demo application
where you can record your voice and then play it on the iPhone ).

I'm trying to get audio samples from the mic in uLaw format.

The audioFormat definition is:
audioFormat.mSampleRate = 8000.0;
audioFormat.mFormatID = kAudioFormatUlaw;
audioFormat.mFormatFlags = 0;
audioFormat.mFramesPerPacket = 1;
audioFormat.mChannelsPerFrame = 1;
audioFormat.mBitsPerChannel = 8;
audioFormat.mBytesPerPacket = 1;
audioFormat.mBytesPerFrame = 1;

I also create 3 buffers of 160 bytes ( 20 millis ) each and enqueue them into the previously created Input Queue.

Everything works, but there is a problem on the frequency I get called to the callback.
It was expected to be every 20 millis. But not. The Callback get called
every 70 nanoseconds and the strange thing is that every half a second the callback is delayed 1 second to be called.

Anybody knows the logic behind this behavior ?
I'm missing any configuration or parameter ????

Thanks
incaiphone is offline   Reply With Quote
Old 04-09-2009, 08:00 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Ahmedabad
Posts: 19
ashish1405 is on a distinguished road
Default

hello, i'm having the same problem. can you suggest me something?
thanks in advance
ashish1405 is offline   Reply With Quote
Reply

Bookmarks

Tags
audiotoolbox, autio input queue, iphone

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 333
8 members and 325 guests
2Apps1Day, akacaj, c2matrix, givensur, Pudding, SLIC, soohyun, Techgirl-52
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,650
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, soohyun
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:08 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0