Re: how do I change bitsperchannel value
Re: how do I change bitsperchannel value
- Subject: Re: how do I change bitsperchannel value
- From: Doug Wyatt <email@hidden>
- Date: Fri, 7 Jul 2006 13:23:22 -0700
On Jul 7, 2006, at 09:42 , apple question wrote:
How do I change the bitsperchannel value for the audio data? i.e,
the original LPCM data is 32bits per channel, I want to convert the
data to 16bits per channel. Create Audio Converter will fail if I
have different bitsperchannel value for input and output data
formats. Thanks.
What are the full AudioStreamBasicDescriptions?
One or both are probably incorrect.
For 16-bit big-endian signed integer, the ASBD should be:
mFormatID = kAudioFormatLinearPCM;
mFormatFlags = kLinearPCMFormatFlagIsBigEndian |
kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked;
mBytesPerPacket = mBytesPerFrame = nchannels * 2; // 16 bits -> 2 bytes
mFramesPerPacket = 1;
mChannelsPerFrame = nchannels;
mBitsPerChannel = 16;
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
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