• 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 ClientDataFormat error on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFileSetProperty ClientDataFormat error on iPhone


  • Subject: Re: ExtAudioFileSetProperty ClientDataFormat error on iPhone
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 12 Oct 2009 08:25:19 -0700

AudioConverter doesn't support floating point formats on iPhoneOS.

On Oct 11, 2009, at 22:31 , tahome izwah wrote:

Hi all

I am getting a 'fmt?' error from ExtAudioFileSetProperty on the device
when trying to set kExtAudioFileProperty_ClientDataFormat with the
following ASBD:

AudioStreamBasicDescription clientFormat;
propSize = sizeof(clientFormat);
memset(&clientFormat, 0, sizeof(AudioStreamBasicDescription));
clientFormat.mFormatID = kAudioFormatLinearPCM;
clientFormat.mSampleRate = sampleRate;
clientFormat.mFormatFlags = kAudioFormatFlagIsFloat |
kAudioFormatFlagIsPacked | kAudioFormatFlagsNativeEndian;
clientFormat.mChannelsPerFrame = numChannels;
clientFormat.mBitsPerChannel = sizeof(float) * 8;
clientFormat.mFramesPerPacket = 1;
clientFormat.mBytesPerFrame = clientFormat.mBitsPerChannel *
clientFormat.mChannelsPerFrame / 8;
clientFormat.mBytesPerPacket = clientFormat.mFramesPerPacket *
clientFormat.mBytesPerFrame;
clientFormat.mReserved = 0;

err = ExtAudioFileSetProperty(extAFRef,
kExtAudioFileProperty_ClientDataFormat, propSize, &clientFormat);
if (err) {NSLog(@"!!! Error in ExtAudioFileSetProperty, %d", err); return err;}


This works fine on the simulator. I'm on iPhone OS 2.0. According to
the documentation, kAudioFormatFlagIsFloat is supported on iPhone 2.0
and later, so I guess it must be something else. The file I'm trying
to read is 16bit mono AIFF @ 44.1kHz, uncompressed.

Any help would be greatly appreciated!

_______________________________________________ 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: ExtAudioFileSetProperty ClientDataFormat error on iPhone
      • From: tahome izwah <email@hidden>
    • AudioComponentInstanceNew timed out on launch error
      • From: Bruce Meagher <email@hidden>
References: 
 >ExtAudioFileSetProperty ClientDataFormat error on iPhone (From: tahome izwah <email@hidden>)

  • Prev by Date: Re: ExtAudioFileRead Crash
  • Next by Date: Re: ExtAudioFileRead Crash
  • Previous by thread: ExtAudioFileSetProperty ClientDataFormat error on iPhone
  • Next by thread: AudioComponentInstanceNew timed out on launch error
  • Index(es):
    • Date
    • Thread