Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
- Subject: Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
- From: William Stewart <email@hidden>
- Date: Thu, 6 Aug 2009 10:54:35 -0700
so... the examples in /Developer/Examples/CoreAudio/SimpleSDK/
ConvertFile can help you to understand what goes in in ExtAudioFile,
which does a number of things, but in this particular case, it pairs
an audio file to an audio converter. There are two sides to the format
that ExtAF deals with - the client format (which can either be the
exact format of what is in the file, or linear pcm as a "canonical
version" - which is float32 on the desktop) and the file format, which
is the format of the data in the file.
Any difference between the file format and the client format implies
the construction of an audio converter that will convert between the
two formats. In the case below, you have a linear pcm client format,
and AAC file format - so you get an audio converter that will do an
AAC encoding. On the phone in the 3.0 software, there is NO support
for an AAC encoder beyond use of it in an AudioQueue (input only), so
that is your error.
So, this is a limitation in the 3.0 software (otherwise everything
that you are doing is correct)
Bill
On Aug 5, 2009, at 3:24 PM, Andrew E. Davidson wrote:
Formatting is still mixed up? What I see is not what you get
Hi
I am trying to use ExtAudioFile to convert a PCM file I create on
the iphone
using Audio Queues into a compressed format (AAC)
For some unknown reason I getting 17184492215 error when I try to set
kExtAudioFileProperty_ClientDataFormat.
Could this have something do with the way I set up the recording
format?
here is how I set the recording format
audioFormat.mSampleRate = self.hardwareSampleRate / 4.0;
audioFormat.mFormatID = kAudioFormatLinearPCM;
audioFormat.mChannelsPerFrame = 1;
audioFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger |
audioFormatFlagIsPacked;
audioFormat.mFramesPerPacket = 1;
audioFormat.mBitsPerChannel = 16;
audioFormat.mBytesPerPacket = 2;
audioFormat.mBytesPerFrame = 2;
here is my code
ExtAudioFileOpenURL ( inputURL, &audioSourceFile);
ExtAudioFileGetProperty ( audioSourceFile,
kExtAudioFileProperty_FileDataFormat, ...)
Copy the input format to the output
outputFormat.mFormatID = kAudioFormatMPEG4AAC;
ExtAudioFileGetPropertyInfo( audioSourceFile,
kExtAudioFileProperty_FileChannelLayout ...)
ExtAudioFileCreateWithURL(outURL, kAudioFileM4AType,
outputFormat, ...)
ExtAudioFileSetProperty(outputFile,
kExtAudioFileProperty_ClientDataFormat,
size, &audioSourceFormat);
Any idea what I am doing wrong?
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
_______________________________________________
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