• 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: Doug McCoy <email@hidden>
  • Date: Mon, 15 Mar 2010 13:49:05 -0800

>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

  • Follow-Ups:
    • Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
      • From: Art Gillespie <email@hidden>
References: 
 >Inconsistent ExtAudioFile API behavior between iPhone OS devices (From: Art Gillespie <email@hidden>)

  • Prev by Date: Re: Audio devices not updating
  • Next by Date: Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • Previous by thread: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • Next by thread: Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
  • Index(es):
    • Date
    • Thread