Getting 'fmt?' error returns from AudioConverterNew ()
Getting 'fmt?' error returns from AudioConverterNew ()
- Subject: Getting 'fmt?' error returns from AudioConverterNew ()
- From: Daniel Stenning <email@hidden>
- Date: Mon, 05 Nov 2007 12:56:24 +0000
- Thread-topic: Getting 'fmt?' error returns from AudioConverterNew ()
I am experimenting with using the CoreAudio audio converter to convert an
aac stream to PCM. With the following settings I am getting 'fmt?' return
errors.
Anyone know what i'm doing wrong ?
AudioStreamBasicDescription ASIn;
AudioStreamBasicDescription ASOut;
ASIn.mBitsPerChannel = 0;
ASIn.mBytesPerFrame = 0;
ASIn.mBytesPerPacket = 0;
ASIn.mChannelsPerFrame= 1;
ASIn.mFormatFlags = kMP4Audio_AAC_LC_ObjectType;
ASIn.mFormatID = "aac ";
ASIn.mFramesPerPacket = 1024;
ASIn.mSampleRate = 44100;
ASOut.mBitsPerChannel = 16;
ASOut.mBytesPerFrame = 2;
ASOut.mBytesPerPacket = 1024;
ASOut.mChannelsPerFrame = 2;
ASOut.mFormatFlags = 3; // for float, big endian
ASOut.mFormatID = 'lpcm';
ASOut.mFramesPerPacket = 512;
ASOut.mSampleRate = 44100;
AudioConverterRef conv;
UInt32 err = AudioConverterNew ( &ASIn, &ASOut, &conv );
Regards,
Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden