ref: 64dc1479b2f3fd3248b58b9a65caf62129ef06b2
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 it 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 perfered method for compiling sox is to use the "configure" scripts compatible with most unix systems that contain "/bin/sh" or equivelent (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 sox directory. If your actively developing SoX, you may optionally wish to run "make depend" after configure to create a detailed dependiency list. 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: AMIGA Makefile.ami (hasn't been verified lately) DOS Makefile.dos (Borland and Turbo C, almost Microsoft C++) or Makefile.unx (using GCC compatible compiler) OS/2 Makefile.unx (using EMX GCC compiler) OS9 Makefile.os9 UNIX Makefile.unx (or most platforms using GCC compatible compiler) VMS descrip.mms & sox.opt (Support is outdated. Read vms.lis) WIN95/NT Makefile.unx (using Cynus GCC for Win32) or Makefile.dos (with a little modifying for Visual C++) 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. Look at Makefile.unx for the most complete set of optional defines that Sox supports. 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. If you're processing lots of u-law or a-law files, you should define FAST_ULAW_COMPRESSION and/or FAST_ALAW_COMPRESSION 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. 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