ref: 866192e9213de1cf6a1a21942a4b816a3f9db7f7
dir: /INSTALL/
SoX: Sound eXchange Installation This distribution will compile and run on most UNIX systems. It was originally developed on a UNIX/386 machine running AT&T V.3.2 but its currently developed under Linux. With little work it should work with most SVR4 systems, BSD-derived UNIX's and DOS/Windows systems that use the GNU tool set. Compiling --------- The preferred method for compiling SoX is to use the "configure" scripts compatible with most UNIX systems that contain "/bin/sh" or equivalent (even the Win95/NT Cygwin setup will work with this). To compile SoX on these platforms run the following commands: ./configure make make install You should then have a working version of SoX in the directory. There are several optional parameters that you may pass to the configure script to customize SoX for your applications. Run "./configure --help" for a complete list of options. If your system works with the "configure" script then you may skip to the Optional Compiling section. If your system does not work with the configure scripts then there are several canned "Makefile"'s that you can use. The following systems have a canned Makefile: DOS Makefile.dos (Borland or Turbo C) WIN95/NT Makefile.dos (Needs modifying for Visual C++) OS/2 Makefile.gcc (using EMX GCC compiler) To use a canned Makefile, a few steps need to be completed. First up, you need to make a copy of stconfig.h.in and call it stconfig.h. Modify this file to reflect your environment. After that, copy either Makefile.dos or Makefile.gcc to a file called Makefile. This needs to be done in both the main SoX directory and the ./gsm directory. This file also needs to be modified to reflect your environment. Optional Compile Features ------------------------- A GSM library is included with SoX. More information on this library can be obtained from http://www.cs.tu-berlin.de/~jutta/toast.html. If this library fails to compile on your system, you can specify --disable-gsm to prevent it from being compiled in. SoX can make use of Ogg Vorbis libraries to play and record Ogg Vorbis files. If this library is installed in a non-standard location in your system then you can use the CPPFLAGS and LDFLAGS variables to allow configure to find this library. For examle, "./configure CPPFLAGS=-I/home/sox/include LDFLAGS=-L/home/sox/lib". If you're not processing lots of u-law or A-law files and would like to save around 64K of memory when SoX is executed then you can use runtime routines to perform u-law/A-law conversions. This is slower then the default lookup tables but results in the same answers. To save this memory, specify --disable-fast-ulaw and --disable-fast-alaw. Testing ------- 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. After that, running "tests.sh" and "testall.sh" ("tests.bat" and "testall.bat" for DOS) tests most of the implemented file handlers to make sure that some portability issue haven't popped up.