Discussion:
DirectSound capture: 24 bit support
(too old to reply)
Ian Green
2005-05-23 21:46:03 UTC
Permalink
Hello,

Judging from archived posts, managed code can not easily capture 24-bit
audio samples. But when I tried 24-bit capture with the latest SDK (April
2005) and a capable sound card (Audigy 2 NX), it just worked.

Settings were Format.Channels=2; Format.BitsPerSample=24;
Format.BlockAlign=6. On two sound cards, not capable of 24-bit operation,
the CaptureBuffer object threw an exception when created, which is useful.
On the Audigy, the capture buffer returned what is almost certainly 24-bit
audio, although handling it in C# is a bit of a pain. (Is there a form of
Array.Copy() that understands a 24 bit source array?).

The 24 bit-ness of the result was assessed both by monitoring the USB data
flow, and from the reduction of certain spectral harmonics in the captured
audio, associated with 16 bit quantising.

Can I expect this to work reliably with other 24-bit sound cards?
Chris P. [MVP]
2005-05-24 00:28:03 UTC
Permalink
Post by Ian Green
Hello,
Judging from archived posts, managed code can not easily capture 24-bit
audio samples. But when I tried 24-bit capture with the latest SDK (April
2005) and a capable sound card (Audigy 2 NX), it just worked.
Settings were Format.Channels=2; Format.BitsPerSample=24;
Format.BlockAlign=6. On two sound cards, not capable of 24-bit operation,
the CaptureBuffer object threw an exception when created, which is useful.
On the Audigy, the capture buffer returned what is almost certainly 24-bit
audio, although handling it in C# is a bit of a pain. (Is there a form of
Array.Copy() that understands a 24 bit source array?).
The 24 bit-ness of the result was assessed both by monitoring the USB data
flow, and from the reduction of certain spectral harmonics in the captured
audio, associated with 16 bit quantising.
Can I expect this to work reliably with other 24-bit sound cards?
The results of this are driver dependent. The issue is whether the is
programmed to accept this format outside of the WAVEFORMATEXTENSIBLE
structure or not. There is precedent that 24-bit audio existed before
WAVEFORMATEXTENSIBLE, as did multi-channel audio - do driver developers are
free to support it in a regular WAVEFORMATEX struct. However my experience
has been that the majority have abandoned that approach and now only
support non 16-bit or > 2 channel in a WAVEFORMATEXTENSIBLE format,
Creative are one of the few that are still supporting the old way in
addition to the new.

-Chris

Loading...