

SOX: Sound Tools installation

February 22, 1997

The sox program is just a batch utility that reads & writes
files.  It's very easy to port to new computers.

This distribution will compile and run on most Unix systems.
It was developed on a Unix/386 machine running AT&T V.3.2.
It has been ported to many AT&T V.3- and V.4-flavored Unixes,
and many BSD-derived Unixes as well.  It also runs under
DOS with Borland C (version 1.5, probably later too).

Sox supports the following operating systems.  Use the listed
Makefile when compiling.

    AMIGA      Makefile.ami & Setup
    Archimedes Makefile.arc
    DOS        Makefile.b30 (Borland 3.0)
    DOS        Makefile.bor (pre-Borland 3.0)
    DOS        Makefile.c70 (Microsoft 7.0)
    OS/2       MakeOS2 & MakeOS2.dep
    OS9        Makefile.os9
    UNIX       Makefile.unx (or DOS with gcc)
    Win NT     sox.nt - Needs work
    VMS        descrip.mms - Needs work.  Read vms.lis

You can run the makefile on most systems by using the following
command line:

make -f Makefile.name      or
make -fmakefile.name

Before compiling you will need to edit the Makfile and uncomment 
the compiler define section related to your operating system
and possibly comment out any previous system defines.

There are a few additional defines available for your operating 
system to add things such as sound playing support.  This is 
documented in the Makefiles

After successfully compiling SOX, try translating a sound file.
If you can play one of the supported sound file formats,
translate 'monkey.voc' to your format (we'll use 'xxx'):

	sox monkey.voc monkey.xxx

You may have to give the word size and rate for the file.
For example, this command will make a sound file with a data rate of
12,500 samples per second and the data formatted as signed shorts:

	sox monkey.voc -r 12500 -s -w monkey.xxx 

If monkey.xxx plays properly (it's a very short monkey screech),
congratulations!  SOX works.  Now you should run the 'tests.sh'
shell script to exercise various test scenarios.  It should
print nothing out.  You can only run this script under Unix.
It shows alternate uses of the (far too) many options to sox.
After that, 'testall.sh' tests most of the implemented file
handlers to make sure that some portability issue hasn't popped up.

After testing with a sound file, try compiling sox with the
optimizer (-O instead of -g).  It should run a little faster.

If you're processing lots of u-law or a-law files, you should
turn on FAST_ULAW_COMPRESSION or FAST_ALAW_COMPRESSION in libst.h.
These substitute a table-based method for the standard method.
The tables are 32K, so if you don't want them, you don't have to
use them.

Lance Norskog
