• 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: Inconsistent ExtAudioFile API behavior between iPhone OS devices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices


  • Subject: Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • From: Art Gillespie <email@hidden>
  • Date: Mon, 15 Mar 2010 14:55:11 -0700

Thanks, Doug.

I thought OS 3.0 added support for software aac encoding, and I
assumed this meant it would work regardless of hardware. Alas, on the
older devices a call to
AudioFormatGetProperty(kAudioFormatProperty_Encoders...) tells me
there's no encoding support whatsoever.

Are the AudioFormat calls the final word? I'm guessing if this returns
an empty array, it means I can't use _any_ API. Would love to be
wrong!

Best,

Art

On Mon, Mar 15, 2010 at 2:49 PM, Doug McCoy <email@hidden> wrote:
> From what I recall, older iphone hardware does not support aac encoding
> through the ExtAudioFile APIs, or maybe not at all. There may be a way to do
> aac encoding on the older HW using AudioQueueServices. Not sure though.
>
> Hope this helps.
>
>
> ---
> Check out my new iPhone app, FlipTalk. Once featured on the iTunes App Store
> "What's Hot" list!
> http://fliptalkapp.com
> http://itunes.com/apps/FlipTalk/
> http://tinyurl.com/FlipTalkYoutube
>
>
>
>
>
> On Mon, Mar 15, 2010 at 1:01 PM, Art Gillespie <email@hidden> wrote:
>>
>> Hi Guys,
>>
>> We're getting the strangest behavior when we try to set client format
>> on an ExtAudioFile. On some devices, this call returns noErr, and on
>> others, 'fmt?'
>>
>> iPod Touch 1st Gen:  'fmt?'
>> iPod Touch 2nd Gen: noErr
>> iPhone 3G: 'fmt?'
>> iPhone 3GS: noErr
>>
>> The code that sets up the AudioStreamBasicDescription is lifted
>> straight from CAStreamBasicDescription, so I'm at a loss. Help!
>>
>> Code follows:
>>
>> ---
>>
>>        AudioStreamBasicDescription clientDescr; //input format
>>        AudioStreamBasicDescription destDescr; //output format
>>        memset(&clientDescr, 0, sizeof(clientDescr));
>>        memset(&destDescr, 0, sizeof(destDescr));
>>
>>        // client description is the same regardless of whether we're doing
>> aif or aac
>>        // i.e., we're sending in 8.24 fixed-point
>>        clientDescr.mFormatID= kAudioFormatLinearPCM;
>>        clientDescr.mSampleRate= 44100.0;
>>        clientDescr.mChannelsPerFrame= 2;
>>        clientDescr.mBitsPerChannel= 32;
>>        clientDescr.mBytesPerPacket= clientDescr.mBytesPerFrame= sizeof
>> (AudioUnitSampleType);
>>        clientDescr.mFramesPerPacket= 1;
>>        clientDescr.mFormatFlags= kAudioFormatFlagsCanonical |
>>                (kAudioUnitSampleFractionBits <<
>> kLinearPCMFormatFlagsSampleFractionShift);
>>        clientDescr.mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
>>
>>        <snip>set up destination format (m4a/aac)</snip>
>>
>>        AudioFileTypeID fileType =
>> (asAAC)?kAudioFileM4AType:kAudioFileAIFFType;
>>        OSStatus err= ExtAudioFileCreateWithURL( hurl, fileType,
>> &destDescr,
>> NULL, kAudioFileFlags_EraseFile, &audioFile );
>>        if( err != noErr ) { ZFAILASSERT(); return false; }
>>        err = ExtAudioFileSetProperty(audioFile,
>> kExtAudioFileProperty_ClientDataFormat, sizeof(clientDescr),
>> &clientDescr);
>>  _______________________________________________
>> 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

References: 
 >Inconsistent ExtAudioFile API behavior between iPhone OS devices (From: Art Gillespie <email@hidden>)
 >Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices (From: Doug McCoy <email@hidden>)

  • Prev by Date: Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • Next by Date: Re: Audio devices not updating
  • Previous by thread: Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • Next by thread: iPhone external mic (mini jack) with dock output
  • Index(es):
    • Date
    • Thread