Re: Inconsistent ExtAudioFile API behavior between iPhone OS devices
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