You can identify an HDCD disc by the HDCD logo somewhere on the back cover. If you have an extensive CD collection, or know somebody who does, there's a good chance you/they have at least one HDCD disc.

HDCD stands for "High Definition Compatible Disc". It was a system developed for CD in the early '90s and released in the mid '90s. Essentially it was a "compansion" scheme that expanded the dynamic range available from a 16-bit format. The clever part was that the instructions for changing the gain were hidden is bursts of code ten times per second in the LSB, so that the normal side-effects of compansion ("breathing", "pumping", etc.) were completely avoided. It was commercialized by a company called Pacific Microsonics, but just as it was gaining momentum SACD and DVD-Audio were released, negating the need for HDCD. The company and process was purchased by Microsoft several years ago. The original patents for the process have apparently expired. An overview is available at: http://en.wikipedia.org/wiki/High_Defin ... le_Digital

There is a side story, and then the heart of the matter.

The side story is that Pacific Microsonics had a brilliant engineering team. Not only did they develop a clever scheme for improving 16-bit audio, but they built the first truly good sounding A/D converter (which also optionally compressed the audio and added the decoding flags into the "subcode" hidden in the LSB). So the HDCD releases were pretty much guaranteed to sound much better than the average CD of the day. But they also had a slimy marketing arm that made many deceptive and misleading claims for the process. The upshot is that many mastering studios still use the HDCD encoders as their main A/D converter as it still sounds quite good, but it always includes the HDCD subcode, even when no compansion features have been turned on by the mastering engineer. So there are many lists on the internet of "HDCD" discs that are misleading -- these discs will light up the "HDCD" light on a CD player equipped to decode the format, but they actually don't require any decoding whatsoever.

The heart of the matter is decoding HDCD discs. Properly done, a decoder will detect the hidden flags in the LSB and do one of two things:

a) Apply a gain expansion of the top 3 dB of the signal, expanding it to a 9 dB range (adding one bit of range).

b) Apply gain expansion of the quietest passages. This occurs in 0.5 dB steps (to avoid obvious jumps in level) with a total range of 4 dB (adding almost another bit of range).

When the first feature is decoded, it requires lowering the overall level by one bit so that the peaks can be accommodated without clipping. Decoding the second feature simply lowers the gain of the signal on-the-fly.

I'm not sure how *precise* that version of the decoder is. There are three issues at the heart of decoding:

a) What is the exact algorithm used for the expansion from the top 3 dB into 9 dB? I have looked at the table used by the code linked above, and while it is probably close enough for most purposes, it definitely is not exact.

b) When the flag is given to signal a level change for the gain expansion of quiet passages, precisely when (to the exact sample) should the gain change occur? Again, the code linked above is probably very close, but not exact.

c) Reverse engineering the flags hidden in the LSB. Again, I'm not sure about the code linked above. It turns out that there were two distinct codes. One was used very rarely, apparently by a prototype encoder. The second one was probably used on all commercial HDCD releases.

Should you choose to build a decoder into Play, the above link should get you well on your way. If you want to get more exact, let me know as I have a couple of contacts that are working on a more precise reverse engineering of the process.