ExtAudioFileCreateNew creates 32-bit float aiffs when 16-bit signed int is requested
ExtAudioFileCreateNew creates 32-bit float aiffs when 16-bit signed int is requested
- Subject: ExtAudioFileCreateNew creates 32-bit float aiffs when 16-bit signed int is requested
- From: "james salter" <email@hidden>
- Date: Tue, 8 Apr 2008 12:34:04 +1000
Hi,
I am suddenly having problems writing 16-bit signed integer AIFFS with ExtAudioFileCreateNew; the problem is that I get a 32-bit float AIFF instead, which hardly anything can play apart from pro audio tools.
The problem seems to have emerged in the last week, possibly because of the update to
10.5.2.Here is my asbd:
AudioStreamBasicDescription asbd;
asbd.mSampleRate = 44100.0;
asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger |
kLinearPCMFormatFlagIsBigEndian |
kLinearPCMFormatFlagIsPacked;
asbd.mBytesPerPacket = asbd.mBytesPerFrame = 4;
asbd.mFramesPerPacket = 1;
asbd.mChannelsPerFrame = 2;
asbd.mBitsPerChannel = 16;
I pass this to ExtAudioFileCreateNew.
I am setting the client format to the canonical 32-bit float format (using ExtAudioFileSetProperty, with kExtAudioFileProperty_ClientDataFormat); I'm writing data out from 3dmixer. But as I understand it that merely describes the format of the data I pass to the writer - not the output.
Am I doing somthing wrong, which only now is causing an issue due to some subtle change in the api? Has anyone else been having this problem?
Thanks,
James
_______________________________________________
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