////////////////////////////////////////////////////////////////////////////
//                           **** WAVPACK ****                            //
//                  Hybrid Lossless Wavefile Compressor                   //
//              Copyright (c) 1998 - 2003 Conifer Software.               //
//                          All Rights Reserved.                          //
//      Distributed under the BSD Software License (see license.txt)      //
////////////////////////////////////////////////////////////////////////////

This package contains all the source code required to make the Win32 and DOS
versions of the WavPack command-line programs, the winamp2 plugin (for
playback) and the CoolEdit file filter (for editing).

There are .dsw and .dsp files for MS Visual C++ 5.0 to build wavpack.exe and
wvunpack.exe (versions 3.97), in_wv.dll (version 1.8) and cool_wv.flt (1.0).
I imagine that these will work fine on later compilers also.

The Borland C++ 4.51 compilers can also be used for the Win32 command-line
programs and are required for the real DOS programs (version 3.4x) and the
self-extraction stub (wvselfx.exe):

Win32
-----
bcc32 -WM -DPACK -4 -Ox -Z wavpack.c pack.c words1.c words3.c words4.c bits.c utils.c
bcc32 -WM -DUNPACK -DVER2 -4 -Ox -Z wvunpack.c unpack.c words1.c words2.c words3.c words4.c bits.c utils.c
bcc32 -DCOMPACT -DUNPACK -4 -O1 -Z wvselfx.c unpack.c words1.c words3.c words4.c bits.c utils.c

DOS
---
bcc -3 -O2 -Z -DPACK wavpack.c pack.c words1.c words3.c words4.c bits.c utils.c
bcc -3 -O2 -Z -DUNPACK -DVER2 wvunpack.c unpack.c words1.c words2.c words3.c words4.c bits.c utils.c

Note that the Borland compiler and UPX are used to create the released version
of wvselfx.exe because they generate the smallest (albeit slower) executable.

Notes:

1. The same source modules are used to build both the Win32 and DOS versions of
   the command-line programs, and most are used for the winamp plugin and the
   CoolEdit filter. To maintain compatibility on various platforms, the
   following conventions are used:

   a "short" must be 16-bits
   a "long" must be 32-bits
   an "int" must be at least 16-bits, but may be larger

2. An attempt was made to write the source code for the command-line programs
   in such a way that it could be easily adapted to other applications, and
   although there is no formal specification of the WavPack file format, the
   code is commented enough that this should not be an issue for a developer.
   The module in_wv.c provides an example of how a program might interface to
   the code to unpack WavPack files with seeking support (although the winamp
   interface is "messy" and so is this plugin). The CoolEdit filter provides
   an example of code to read (without seeking) and write WavPack files,
   including the process of generating the required RIFF headers that is not
   included in the command-line program (because it uses the headers of the
   original wav files). In fact, the CoolEdit filter provides a decent high-
   level interface to the WavPack code that could be used as is or modified
   by the user according to their exact needs.

3. The unpacking code will decode any WavPack file ever created, but obsolete
   modes (like the old lossy mode) have been eliminated from the packing code
   to save space and reduce complexity. For this reason, not all combinations
   of the "flags" field of the WavpackHeader can be used to create WavPack
   files (even if they appear in existing WavPack files). The exact modes (and
   their corresponding flags) are detailed in the pack.c module.

4. It is not recommended that the __MT__ define be used to create code that
   performs overlapped I/O because it only seems to provide an improvement on
   Win95/98 platforms and it is rather complex.

5. Questions or comments should be directed to david@wavpack.com
