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

ExtAudioFileSetProperty ClientDataFormat error on iPhone


  • Subject: ExtAudioFileSetProperty ClientDataFormat error on iPhone
  • From: tahome izwah <email@hidden>
  • Date: Mon, 12 Oct 2009 07:31:00 +0200

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!

Thanks,
--th
 _______________________________________________
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: Doug Wyatt <email@hidden>
  • Prev by Date: Re: ExtAudioFileRead Crash
  • Next by Date: Re: AVAudioPlayer interferes Output Audiounit on Simulator ?
  • Previous by thread: Re: Recommended way to handle suspend/resume on notebooks
  • Next by thread: Re: ExtAudioFileSetProperty ClientDataFormat error on iPhone
  • Index(es):
    • Date
    • Thread