ref: f6508ee2270bade4ff957e22084a017f36a07dfa
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 systems that use the GNU tool set. Compiling --------- The prefered 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 Testing 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) You can run the makefile on most systems by using the following command line: make -f Makefile.name or make -fMakefile.name Before compiling with a canned Makefile you will need to edit the Makefile 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 generally documented in the Makefiles Optional Libraries ------------------ There is optional GSM support as a data type but you must first install the GSM library on your system. More information on it can be obtained from http://www.cs.tu-berlin.de/~jutta/toast.html After installing the GSM library you must point to this file by commenting and modifying the appropriate section of the Makefile. The "configure" script should be able to detect the installation of the external GSM library and compile in support on its own. Optional Compile Options ------------------------ If you're processing lots of u-law or a-law files, you should define FAST_ULAW_CONVERSION and/or FAST_ALAW_CONVERSION in your Makefile. 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. It is automatically added to your Makefile if you run the configure script with the --enable-fast-ulaw or --enable-fast-alaw options. 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. Now you should run the "tests.sh" shell script if your running under a unix varient to exercise various test scenarios. It should print nothing out. You can also run tests.bat under DOS for similar tests. After that, "testall.sh" ("testall.bat for DOS) tests most of the implemented file handlers to make sure that some portability issue haven't popped up