Re: AudioConverterNew() failure
Re: AudioConverterNew() failure
- Subject: Re: AudioConverterNew() failure
- From: "Andreas Falkenhahn" <email@hidden>
- Date: Sun, 26 Aug 2007 16:15:42 +0200
To answer my own question: It seems that the kAudioFormatFlagIsSignedInteger
bit needs to be set in the source format.
Andreas
On 26.08.2007 at 13:08 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
--
"Remember: It's nice to be important but it's more important to be nice!"
_______________________________________________
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