AudioConverter problems...
AudioConverter problems...
- Subject: AudioConverter problems...
- From: email@hidden
- Date: Wed, 16 Oct 2002 16:24:41 +0100
Hello,
I've started using the AudioConverter to translate between formats. I'm
getting the kAudioConverterErr_FormatNotSupported error using the code
below. This code doesn't error when done in reverse.
Any ideas? Thanks!
// now fill out the source description
sourceFormat.mSampleRate = 44100.0;
sourceFormat.mFormatID = kAudioFormatLinearPCM;
sourceFormat.mFormatFlags = kAudioFormatFlagIsBigEndian &
kAudioFormatFlagIsFloat;
sourceFormat.mBytesPerPacket = 4;
sourceFormat.mFramesPerPacket = 1;
sourceFormat.mBytesPerFrame = 8;
sourceFormat.mChannelsPerFrame = 2;
sourceFormat.mBitsPerChannel = 32;
// fill out our destination description
destinationFormat.mSampleRate = 44100.0;
destinationFormat.mFormatID = kAudioFormatLinearPCM;
destinationFormat.mFormatFlags =
kLinearPCMFormatFlagIsSignedInteger;
destinationFormat.mBytesPerPacket = 4;
destinationFormat.mFramesPerPacket = 1;
destinationFormat.mBytesPerFrame = 4;
destinationFormat.mChannelsPerFrame = 2;
destinationFormat.mBitsPerChannel = 16;
// make the audio converter
theResult = AudioConverterNew(&sourceFormat, &destinationFormat,
&audioConverter);
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.