From: brodskye at cae.wisc.edu Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.utilities,alt.sb.programmer,comp.sys.ibm.pc.soundcard.misc,comp.sys.ibm.pc.soundcard.tech Subject: Re: Need Windows 3.1 ADPCM sound driver Date: 30 Mar 1997 23:44:11 GMT Lines: 60 Message-ID: <5hmtsb$45s8@news.doit.wisc.edu> References: <333e0baa.17013842@news.Dal.ca> Reply-To: ebrodsky@pobox.com [newsgroups comp.sys.ibm.pc.soundcard.{advocacy,music} trimmed] In article , bob wrote: >> It's my understanding that the ADPCM format is just the format in >> which the sound file is saved, and the ability to play it correctly >> depends on which player you are using. Sound utilities like Cool Edit >That's not really true. The compression schemes aren't specific to the >file format, so a .VOC file or a .WAV file could use some random >compression scheme and need the windows CODEC to uncompress the data. Even >cooledit won't decompress ADPCM if you don't have the ADPCM codec >installed in windows. And even the sound recorder will play back a >compressed wave file if the codec is installed. >That's why there are virtually no DOS programs that can play back >compressed files. How to decode compressed audio depends on the compression format, the software you have installed, and the hardware you have installed. For the original Creative Labs 4-bit, 2-bit, and 2.5-bit (also called 3-bit and 2.6666-bit) formats, any Creative Labs sound card will decode them for 8-bit output in hardware. If you're interested, the relevant DSP commands are 16, 17, 74-77, 7D, and 7F. These ADPCM formats are supported in Creative Labs VOC files, and I believe they are used for the "Creative ADPCM" compression for WAV files. Unfortunately, it is likely that many "compatibles" do not support these DSP calls, and the drivers may have problems with them. Next, there are the A-Law and Mu-Law compression formats, which AFAIK compresses 16-bit data to 8-bits per sample. These are usually (at least not for SBs) not supported directly by the sound card, but can easily be decoded in software. Creative Labs has made available Borland C code for compression and decompression of mu-law and a-law (as well as the 4-bit ADPCM). Their programs use about ten lines of C code per sample for decompression, but it can probably be done with less than ten assembly instructions if you work at it. This is the extent of my experience with compression. I'm aware of several other formats commonly used. There are two other ADPCM formats: the IMA ADPCM format, which I believe was adopted by Intel; and Microsoft ADPCM, which I know nothing about. Windows 95 introduces several new formats. In addition to the formats I've listed above (excluding the Creative Labs ones, which I don't recall seeing), there are two GSM formats (GSM is a an algorithm that can efficiently compression voice; it's used for cell-phones), and Truespeech, which can compress voice _really_ efficiently. (I'm using it in a commercial product and it is compressing to 1kbyte/second with no significant loss of quality). For working with these formats, the best solution is to go through the Audio Compression Manager, which automates (with a lot of effort) the conversions. There were 40 or so registered compressed audio formats as of three years ago: I'm sure there are many more by now. Hope this gives some insight into audio compression, Ethan Brodsky -- ----