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

From: Culann mac Cabe (culann_at_rocudo.com)
Date: 03/01/05


Date: Tue, 1 Mar 2005 15:10:16 -0000

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?

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?

Thanks,

Culann.

"Chris P. [MVP]" <msdn@chrisnet.net> wrote in message
news:1feldckijqio5.m7alo5rm7tce.dlg@40tude.net...
> On Fri, 25 Feb 2005 16:16:42 -0000, Culann mac Cabe wrote:
>
>> Hello,
>>
>> I'm completing work on an ACM driver (thanks Chris) and am testing it
>> with
>> various clients (SoundRecorder, WinMediaPlayer, WinAmp, Audition. My
>> codec
>> compresses 16 and 24 bit PCM wavs. I have the 16 bit and 24 bit
>> compression
>> algorithms working etc.
>>
>> In terms of the template code for my ACM driver, all references to audio
>> passed in and out is though pointers to the "source" and "destination"
>> via
>> headers in the WAVEFORMATEX stucture. This is all fine for my 16-bit
>> PCM-16-bit Compressed scenario - I read the wBitsPerSample from the
>> source
>> header, copy all values to the destination and bang in my compressed
>> data.
>> When I use e.g. SoundRecorder to save a 16-bit PCM to my compressed
>> format
>> and look at the resulting file properties, I see the channels, Fs,
>> BitsPerSample etc. all as I would expect and all my ACM clients can play
>> it
>> no problem...
>>
>> Now to the 24-bit scenario: my driver needs to compress from 24 bit PCM
>> to
>> 24-bit compressed and to do that I'm doing the exact same as for the
>> 16-bit
>> case above - this time I set wBitsPerSample = 24 in the wav header. If I
>> use an ACM client to open a 24 bit PCM and convert to my 24 bit
>> compressed
>> format, I can see that the resulting file properties (i.e. using
>> Alt+Enter)
>> are reported as my compressed file format tag 24 bits etc. Yet when I
>> try
>> to import into an editor (e.g. Audition) the file bit depth is reported
>> as
>> 16 bit....
>>
>> Any help please! I'd like not to have to move everything to
>> WAVEFORMATEXTENSIBLE as I undertand it's advisable for > 16 bit audio
>> files... but if I have to some tips on the correct parameters would be
>> majorly appreciated...
>
> Support for > 16 bit with the WAVEFORMATEX structure is vendor dependent.
> You may find that some software supports it and others do not. From my
> previous testing I've found that apps such as Windows Media Player will
> not
> play 24 or 32 bit data files unless they have the WAVEFORMATEXTENSIBLE
> header format.
>
> Other than that just check that you have all the other header values
> correct, i.e. make sure your block-align value is divisible by 3 and the
> nAvgBytesPerSec value is calculated correctly.
>
> Otherwise you may have no choice but to bight the WAVEFORMATEXTENSIBLE
> bullet, we did a while back as it was the only way to get true
> multi-channel support.



Relevant Pages

  • Re: Regular Expression - old regex module vs. re module
    ... The ReportTemplate class reads a template file or string containing a ... header and line format for multiple calls with sequence data. ... def _format: ...
    (comp.lang.python)
  • Re: How can I insert BOTH a header and upper-right page numbering?
    ... WP is being able to format by using simple buttons, ... loaded the Quick Access toolbar with all the basic commands I ... A Page number isn't considered to be, in itself, a header, but a part of a header. ... The Building Block galleries can be helpful for the 'now where did I save that' question when you know you had something 'only last ...
    (microsoft.public.word.docmanagement)
  • Re: adding headers and footers to a word document
    ... I clicked on SHOW NEXT and got to the even page header. ... The front matter has no title showing on the odd pages. ... Should I do the author/title first or the numbering? ... the page numbers using the Format Page Number button; ...
    (microsoft.public.word.docmanagement)
  • RE: Quoted Printable in Messages (Subject Changed)
    ... which definitely went out in HTML format with all the MIME headers and so ... The important part is the Content-Transfer-Encoding: header line. ... the last character on the line as a "soft" line break accommodates longer ... followed by a two-digit hexadecimal representation. ...
    (comp.os.vms)
  • Re: How can I put dictionary-style page headers in an Access repor
    ... How do I reformat my document from table format to ... (First Greek word and last Greek word on the page). ... can seem to find a way to do the same in an Access Report. ... the control in the header. ...
    (microsoft.public.access.reports)