Audio Recording Format

Joined
Nov 4, 2011
Messages
1
Reaction score
0
Points
1
Dear All,
I created file using code:
XThrowIfError(AudioFileCreateWithURL(url, kAudioFileWAVEType, &mRecordFormat, kAudioFileFlags_EraseFile,&mRecordFile), "AudioFileCreateWithURL failed");
CFRelease(url);
mRecordFormat.mChannelsPerFrame=1;
mRecordFormat.mSampleRate=8000;
mRecordFormat.mFormatID = inFormatID;
if (inFormatID == kAudioFormatLinearPCM)
{
// if we want pcm, default to signed 16-bit little-endian
mRecordFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger| kLinearPCMFormatFlagIsPacked;
//mRecordFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger;
//mRecordFormat.mFormatFlags|=~ kLinearPCMFormatFlagIsSignedInteger;
mRecordFormat.mBitsPerChannel =8;
mRecordFormat.mBytesPerPacket = mRecordFormat.mBytesPerFrame = (mRecordFormat.mBitsPerChannel / 8) * mRecordFormat.mChannelsPerFrame;
mRecordFormat.mFramesPerPacket = 1;
}
It was recording and showing size of the file,and not playing in iphone or other players also.
Is there any another seetings required in Recording format for this.
Please help,
Regards,
Medwrite
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top