WAV Files

Let me begin by assuring you that computers are simple. The people who set standards and write programs for them are not.

A WAV file consists of three elements: a header, audio data, and a footer. The header is mandatory and contains the specifications for the file - information on interpreting the audio data - and optional material including copyright. The audio data are - um - audio data in the format specified by the header. The footer is optional and, if present, contains other annotation. I like to call the combination of header and footer the 'envelope' of the data. Usually, the data in a WAV file take the form of PCM bit streams. A simple one would be 8-bit samples taken 11,025 times per second from a single (monaural) channel. Then within the envelope would be a RAW file - the sequence of those 8-bit bytes in order and ready to be fed to a sound card's Digital to Analogue Converter (DAC) to play on your speakers. There is a well-defined way to put the other formats into the RAW file, which then goes into the envelope containing the information about how to make sense of the bytes which follow. What gets written to a CD-R is very much like the RAW file, with one important modification: the order of bits in each byte is reversed. So your CD-R authoring program can take a 44.1-KHz, 16-bit, stereo WAV file (i.e., in redbook format) out of its envelope, switch the order of bits, and write it to your disc.

Other formats can be stored in a WAV file. Apart from changing the PCM parameters, you can put a compressed stream into the envelope. Whatever is in the WAV file, your CD-R program must convert it to redbook in order to write CD-DA (Compact Disc, Digital Audio); and if the disc is not in CD-DA, it won't play on an ordinary audio CD machine. In many cases, converting from another format to CD-DA will require substantial processing. As a result, you may not be able to keep up with the writing speed of your CD-R. Since the program does not know how fast your computer is or how much processing will be needed, ECDC (at least) always converts a non-redbook WAV to redbook in a temporary file before writing it to your disc. ECDC also doesn't want to run out of disc space during that conversion, so it converts one file at a time, writes it to the CD-R, then converts the next. Writing one track at a time, it obviously cannot write DAO.

Now we get to the messy part. Not all programs follow all the rules all the time. As a result, the envelope may not be quite what it should be to make a valid WAV file. When that difference confuses the next program reading the file, it may refuse to open the WAV file or it may need to be told the format of the audio data, or it may just interpret some of the envelope information as audio data. For example, the 16-bit version of DART Pro appears to convert a valid header with annotation to an invalid one and does not recognize footers at all. If you feed it a WAV file from a program like GoldWave, which creates an envelope with valid annotation in the header and footer, it produces an output file which is almost unreadable. Fortunately, GoldWave will open it - when you tell it what format it has. Unfortunately, the envelope information DART Pro did not respect are still present - as data within the audio file. Those can be heard as initial and final clicks and can be seen in the first and last milliseconds of the file. If you snip those data out of the file, you can now Save As WAV and get a proper file again. Another option is to run StripWave. That program will strip the footer (it is unnecessary) before you start the offending program. Run it after that program has mishandled the header and it will strip out the excess audio - the initial click. NOTE: DART Pro is not the only offender and the 32-bit version appears to leave annotation where it is.

Another problem program is Plextor Manager. It also fails to put the right information into the header so that data appear in the audio stream. Again, StripWave will fix it easily - but you may not need to do so. The effect of the faulty envelope varies depending on the next program to see it. Some authoring programs are able to strip the faulty data the same way that StripWave does, so the simple error will not show up on your disc. Or, if it does, it may be lost when it is read from the disc. So once you have a bad envelope, you may or may not get an initial click or a final click. And you may get it on DAE but not when you listen to the disc, or hear it when you play the disc but not see it on DAE. If you do have the faulty file and process it before writing it to CD-R, the processing (WAV editing) program may refuse to open the file, may embed the data in the audio stream so that the click is guaranteed to show up later, or may correct the problem for you.

The bottom line is that you either set up a procedure which you know works for your software and your needs, or you figure out for yourself when and how you strip the faults from the WAV files. Note that StripWave is shareware and links to it and to other interesting tools are in the URLs at this site.


E-mail me at cdrecording@mrichter.com
Return to Mike's home page