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

Re: ExtAudioFileSetProperty


  • Subject: Re: ExtAudioFileSetProperty
  • From: Doug Wyatt <email@hidden>
  • Date: Wed, 18 Jun 2008 07:56:42 -0700

The source data format specifies 24 bits in the low-order bits of 32- bit words. AudioConverter doesn't support that... ExtAudioFile uses AudioConverter.

D

On Jun 15, 2008, at 13:41, Jeff LaMarche <email@hidden> wrote:

Greetings all...

I'm having problems writing data to a file. I've got a buffer of data that came from a device that's got the following characteristics (inASBD)

mBitsPerChannel        24
mBytesPerFrame            8
mBytesPerPacket        8
mChannelsPerFrame        2
mFormatFlags            4 // (kAudioFormatFlagIsSignedInteger)
mFormatID                1819304813 // kAudioFormatLinearPCM
mFramesPerPacket        1
mSampleRate            48000

I'm trying to write this to an AIIF file, so I create a new ASBD, which has the following values (outASBD):

mBitsPerChannel 24
mBytesPerFrame 6
mBytesPerPacket 6
mChannelsPerFrame 2
mFormatFlags 14 // (kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked | kAudioFormatFlagIsBigEndian)
mFormatID 1819304813 // kAudioFormatLinearPCM
mFramesPerPacket 1
mSampleRate 48000


I'm able to open the output file for writing using ExtAudioFileCreateNew with the outASBD, but when I call ExtAudioFileSetProperty to set the ExtAudioFilePropertyID property to inASBD so it knows how to do the conversion, I get a 'fmt?' error. I can get it to work if I change the mBytesPerFrame and mBytesPerPacket of inASBD 6, but that creates a file full of static, because I'm lying to system about the number of bytes per frame in the input data.

Does anyone have any idea what's going on? I'm been pulling my hair out over this for quite some time.

Thanks,
Jeff
_______________
_______________________________________________
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: 
 >ExtAudioFileSetProperty (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: AudioBuffer question
  • Next by Date: Re: AudioBuffer question
  • Previous by thread: ExtAudioFileSetProperty
  • Next by thread: Inconsistencies in getting kAudioObjectPropertyName
  • Index(es):
    • Date
    • Thread