FW: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat )returns error 1718449215
FW: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat )returns error 1718449215
- Subject: FW: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat )returns error 1718449215
- From: "Andrew E. Davidson" <email@hidden>
- Date: Thu, 6 Aug 2009 12:29:44 -0700
Hi Bill
Thanks. I now understand why I could convert PCM to AAC in the simulator but
on the iPhone. I really do not care which format I convert to. My goal is to
compress the file into something that most clients can play back. What
format would you recommend?
I tried using MP3 but could not even get this to work in the simulator.
Setting the client data format fails with 1718449215 (format error)
Here is my input format
inputFormat.mSampleRate = self.hardwareSampleRate / 4.0;
inputFormat.mFormatID = kAudioFormatLinearPCM;
inputFormat.mChannelsPerFrame = 1;
inputFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger |
audioFormatFlagIsPacked;
inputFormat.mFramesPerPacket = 1;
inputFormat.mBitsPerChannel = 16;
inputFormat.mBytesPerPacket = 2;
inputFormat.mBytesPerFrame = 2;
am I setting up the mFormatFlags incorrectly when I record? I copied these
setting from the speakHere sample app.
here is how I am setting up the output format for mp3. I used
/usr/bin/afinfo and the debugger to look at settings for mp3 files in iTunes
outputFormat.mSampleRate = inputFormat.mSampleRate
outputFormat.mFormatID = kAudioFormatMPEGLayer3;
outputFormat.mChannelsPerFrame = input.mChannelsPerFrame;
outputFormat.mFormatFlags = inputFormat.mFormatFlags;
outputFormat.mFramesPerPacket = 1152;
outputFormat.mBitsPerChannel = 0;
outputFormat.mBytesPerPacket = 0;
outputFormat.mBytesPerFrame = 0;
ExtAudioFileCreateWithURL(outURL, kAudioFileMP3Type, outputFormat, ...)
ExtAudioFileSetProperty(outputFile, kExtAudioFileProperty_ClientDataFormat,
size, &inputFormat);
Any idea what I am doing wrong?
I looked at /Developer/Examples/CoreAudio/SimpleSDK/ it is pretty hard to
understand.
Thanks
Andy
_______________________________________________
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