Re: Decoding compressed to LPCM
Re: Decoding compressed to LPCM
- Subject: Re: Decoding compressed to LPCM
- From: Stephen Davis <email@hidden>
- Date: Mon, 21 Apr 2008 10:14:43 -0700
On Apr 21, 2008, at 10:01 AM, Stephen Davis wrote:
Your comment says you're setting the audio format to 44.1kHz,
stereo, 16-bit native-endian integer but you're actually setting it
to 44.1kHz, stereo, 32-bit native-endian floating point. I'd
surmise that might be the issue. :-)
Off the top of my head, I think you just need to change these lines:
clientFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger |
kAudioFormatFlagIsPacked;
clientFormat.mBitsPerChannel = 8 * sizeof(short);
Note that this is setting the data to little-endian which is
required for the WAV format.
The format you were using should've worked since .WAV supports 32-
bit floating point files but it may have been failing for one or
both of the following two reasons:
1) You're on a powerpc machine and the kAudioFormatFlagIsPacked
specifies native-endian.
Oops, I meant kAudioFormatFlagsCanonical specifies native-endian.
stephen
_______________________________________________
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