• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215


  • Subject: Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
  • From: Doug Wyatt <email@hidden>
  • Date: Thu, 6 Aug 2009 12:24:16 -0700

Just one minor clarification...

On Aug 6, 2009, at 10:54 , William Stewart wrote:

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)

The client format can be any PCM format you want. If that's something other than the canonical format, that might result in a multi-step AudioConverter, but that detail is hidden from you, at least until you start measuring performance :-)


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:
@apple.com


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:
@apple.com


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
References: 
 >RE: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215 (From: "Andrew E. Davidson" <email@hidden>)
 >Re: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215 (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Wrapper class for Cocoa Audio Units in Carbon Hosts
  • Next by Date: FW: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat )returns error 1718449215
  • Previous by thread: RE: ExtAudioFileSetProperty( kExtAudioFileProperty_FileDataFormat ) returns error 1718449215
  • Next by thread: Looking for an audio file explorer . . .
  • Index(es):
    • Date
    • Thread