Re: How to deal with 24 bit PCM in ACM driver

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Chris P. [MVP] (msdn_at_chrisnet.net)
Date: 03/01/05


Date: Tue, 1 Mar 2005 11:13:59 -0500

On Tue, 1 Mar 2005 15:10:16 -0000, Culann mac Cabe wrote:

> Thanks Chris,
>
> I can see that different clients set wav header data differently before
> passing it to me; for example even though Adobe audition allows me to create
> a 24-bit noise file in PCM wav format (this shows up as "24bit Packed Int
> type 1"), when it passes this format to my driver, it sets the relevant
> source stream headers BitsPerSample as 16 bit, even though it correctly sets
> my compressed 3-byte format destination header as 24bit, i.e. . Why might
> this be?

That's rather odd, sounds like a bug in Audition.

> Assuming I can figure out a workaround for identifying when a PCM stream is
> 16 or 24 bit, can I then assume that 24 bit packed int means each 24 bit
> sample is packed into 3 continous bytes?

If the type is 1, 24 bit will be packed in 3 continuous bytes. If the type
is WAVE_FORMAT_EXTENSIBLE, the packing is determined by the wBitsPerSample
and wValidBitsPerSample value.