RE: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
RE: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
- Subject: RE: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
- From: "Andrew E. Davidson" <email@hidden>
- Date: Wed, 5 Aug 2009 15:24:22 -0700
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