ref: dbc561bca5b488b8f3f2048374c5162403be6ae6
dir: /INSTALL/
SOX: Sound Tools Installation October 16, 1998 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 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. Sox supports the following operating systems. Use the listed Makefile when compiling. 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 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. 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 haven'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 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.