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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 11-02-2009, 09:58 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 19
Default AVAudioRecorder - What values of AVLinearPCMBitDepthKey are valid?

Hi

I am trying to record audio (into a wav file) with a bit rate of 8 bits. But in my record settings, if I set the value for AVLinearPCMBitDepthKey to 8, no audio is recorded. I am using a headset for recording on an iPhone.

Can someone please tell me whats wrong with the following record settings

Code:
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue :[NSNumber numberWithInt:8] forKey:AVLinearPCMBitDepthKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];

Thanks.

More Info
Found something more on debugging

The recorder object is created without any errors with the bit rate set to 8. But looks like it doesn't record. When I stop recording, the delegate method audioRecorderDidFinishRecording: is not called. The method is called when the bit rate is 16 or above.

Last edited by lostInTransit; 11-02-2009 at 10:50 AM. Reason: added details
lostInTransit is offline   Reply With Quote
Reply

Bookmarks

Tags
audio, avaudiorecorder

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: 291
20 members and 271 guests
14DEV, ADY, Bertrand21, Dani77, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84, Sunny46
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

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