Re: AudioConverterNew() failure
Re: AudioConverterNew() failure
- Subject: Re: AudioConverterNew() failure
- From: William Stewart <email@hidden>
- Date: Mon, 27 Aug 2007 11:08:43 -0700
For PCM, a format flags of zero would be:
unsigned integer, little endian, not packed, aligned low and
interleaved :)
We don't have a conversion operation for this kind of int format (we
mostly expect unsigned ints to only be 8 bit)
Bill
On 26/08/2007, at 4:08 AM, Andreas Falkenhahn wrote:
Hi,
could someone please tell me why AudioConverterNew() fails with
these inputs?
It returns 'fmt?' but I really don't see the problem here. I can
successfully convert
any 8-bit encoded data (mono & interleaved stereo) with the audio
converter, but
as soon as I skip to 16-bits encodings the audio converter cannot
be created!?
// this is the output format
asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked |
kAudioFormatFlagIsNonInterleaved;
asbd.mChannelsPerFrame = 2;
asbd.mSampleRate = 44100;
asbd.mBitsPerChannel = 32;
asbd.mFramesPerPacket = 1;
asbd.mBytesPerFrame = sizeof(Float32);
asbd.mBytesPerPacket = sizeof(Float32);
// this is the input format (16 bits, mono; but 16 bit interleaved
stereo doesn't work either)
desc.mFormatID = kAudioFormatLinearPCM;
desc.mFormatFlags = 0;
desc.mChannelsPerFrame = 1;
desc.mSampleRate = 13964;
desc.mBitsPerChannel = 16;
desc.mFramesPerPacket = 1;
desc.mBytesPerFrame = 2;
desc.mBytesPerPacket = 2;
res = AudioConverterNew(&desc, &asbd, &converter);
res will be 'fmt?' and converter will be NULL. Why?
Tks
Andreas
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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