ExtAudioFileSetProperty
ExtAudioFileSetProperty
- Subject: ExtAudioFileSetProperty
- From: Jeff LaMarche <email@hidden>
- Date: Sun, 15 Jun 2008 16:41:42 -0400
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