shithub: sox

Download patch

ref: f628fcf20a5fe8e577f8ed1e4a103ece8c8d7e3e
parent: fc31b99083d3a416ca2e4660b6480d6cb9bd2517
author: idigdoug <idigdoug>
date: Sun Dec 6 01:56:56 EST 2009

Update documentation regarding VC9 build.

--- a/INSTALL
+++ b/INSTALL
@@ -207,6 +207,12 @@
 Compiling using Microsoft's Visual C
 ------------------------------------
 
+To compile a full-featured build of SoX with Visual C 9.0, you may be able to
+use the preconfigured solution found in the sox\msvc9 folder. See
+sox\msvc9\readme.txt for details. If the preconfigured solution doesn't work
+for you or if you are not using Visual C 9.0, follow the CMake instructions
+given below.
+
 o Install cmake (http://www.cmake.org/HTML/Download.html)
 o Install any optional libraries to use with SoX
 o Unpack the SoX sources (...tar.gz) to say c:\sox
@@ -220,8 +226,12 @@
 Appendix: How To Compile SoX with MP3 Support on Win32
 ------------------------------------------------------
 
+The solution file in the msvc9 will build SoX to dynamically load
+libmad.dll and libmp3lame.dll at runtime.
+
 The following text, untested by the SoX team, was originally written
-by `Enter AG' and released to the public domain.
+by `Enter AG' and released to the public domain. It includes instructions for
+building SoX with MP3 support linked directly into the SoX executable.
 
 = How To Compile Sox with MP3 Support =
 
@@ -230,18 +240,18 @@
 The following requirements have been tested. Nevertheless, other
 versions may work as well.
 
-o Microsoft Windows (Win32, Win2k, Win2003).
+o Microsoft Windows (Win32, Win2000, XP, Win2003, Vista, etc.).
 
 o CMake (Cross Platform Make) version 2.4
   available on [http://www.cmake.org]
 
-o Microsoft Visual Stuio 2008 (also earlier Versions)
+o Microsoft Visual Stuio 2008 (earlier versions should also work).
 
 o SoX source distribution version 14.0.1
   available on [http://sox.sourceforge.net]
 
-o LAME source distribution version 3.97.  3.98 required for full ID3 tag 
-  support. available on [http://lame.sourceforge.net]
+o LAME source distribution version 3.97. LAME 3.98 is required for full ID3 tag 
+  support. Available on [http://lame.sourceforge.net]
 
 o MAD source distribution version 0.15.1b
   available on [http://www.underbit.com/products/mad/]
@@ -305,10 +315,10 @@
 o If the Visual Studio settings are done as described above the following cmake
   output should appear:
   ...
-  include files HAVE_MAD_H1 – found
-  mad_stream_buffer in madmad_stream_buffer in mad – found
+  include files HAVE_MAD_H1 - found
+  mad_stream_buffer in madmad_stream_buffer in mad - found
   ...
-  include files HAVE_LAME_LAME_H1 – found
+  include files HAVE_LAME_LAME_H1 - found
   lame_init in mp3lamelame_init in mp3lame - found
   ...
 
--- a/README.win32
+++ b/README.win32
@@ -1,163 +1,157 @@
-SoX
----
-
-This file contains information specific to the Win32 version of SoX.
-Please refer to the README file for general information.
-
-The binary SOX.EXE can be installed anywhere you desire.  The only
-restriction is that the included CYGWIN1.DLL and CYGGOMP-1.DLL must be 
-located in the same directory as SOX.EXE or somewhere within your PATH.
-
-SoX Helper Applications
------------------------
-
-SoX also includes support for SOXI.EXE, PLAY.EXE and REC.EXE and their
-behaviors are documented in included PDF's.  They have the same
-install restrictions as SOX.EXE.
-
-SOXI.EXE, PLAY.EXE, and REC.EXE are not distributed with this package to 
-reduce size requirements. They are, in fact, only copies of the original
-SOX.EXE binary which changes SOX.EXE's behavior based on the
-executable's filename.
-
-If you wish to make use of these utils then you can create them
-yourself.
-
-copy sox.exe soxi.exe
-copy sox.exe play.exe
-copy sox.exe rec.exe
-
-If you are concerned with disk space, the play and record
-functionality can be equated using the "-d" option with SOX.EXE.  soxi
-functionality can be equated using the "--info" option with SOX.EXE. The
-rough syntax is:
-
-play: sox [input files and options] -d [effects]
-rec: sox -d [output file and options] [effects]
-soxi: sox --info [input files and options]
-
-wget
-----
-
-SoX can make use of the wget command line utility to load files over
-the internet.  A binary copy of wget has been included with this
-package of SoX for your convience.
-
-For SoX to make use of wget, it must be located either in your PATH or
-within the same directory that SoX is ran from.
-
-Custom configuration of wget can be made by editing the file wget.ini
-contained in the same directory as wget.exe.
-
-Please consult wget's homepage for access to source code as well as
-further instructions on configuring.
-
-http://www.gnu.org/software/wget
-
-Acknowledgements
-----------------
-
-SOX.EXE included in this package makes use of the following projects.
-See the cygbuild script included with the source code package for
-further information on how it was compiled and packaged.
-
-  SoX - http://sox.sourceforge.net
-
-  Ogg Vorbis - http://www.vorbis.com
-
-  FLAC - http://flac.sourceforge.net
-
-  libsndfile - http://www.mega-nerd.com/libsndfile
-
-  WavPack - http://www.wavpack.com
-
-  PNG - http://www.libpng.org/pub/png
-
-Enjoy,
-The SoX Development Team
-
-Appendix - MP3 Support
-----------------------
-
-SoX contains support for reading and writing MP3 files but does not ship
-with the DLL's that perform decoding and encoding of MP3 data because
-of patent restrictions.  For further details, refer to:
-
-http://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues
-
-MP3 support can be enabled by placing Lame encoding DLL and/or
-MAD decoding DLL into the same directory as SOX.EXE.  These
-can be compiled yourself, may turn up on searches of the internet
-or may be included with other MP3 applications already installed
-on your system. Try searching for cygmp3lame-0.dll, libmp3lame.dll, 
-cygmad-0.dll, and libmad.dll.
-
-Instructions are included here for using Cygwin to create the DLL's. 
-It is assumed you already have cygwin installed on your system
-with its optional gcc compiler installed.  The commands are ran from
-bash shell cygwin installs.
-
-Obtain the latest Lame and MAD source code from approprate locations.
-
-Lame MP3 encoder  http://lame.sourceforge.net
-MAD MP3 decoder   http://www.underbit.com/products/mad 
-
-cd lame-398-2
-./configure
-make
-cp libmp3lame/.libs/cygmp3lame-0.dll /path/to/sox/libmp3lame.dll
-
-MAD library up to 0.15.1b has a bug in configure that will not allow
-building DLL under cygwin.  So an additional command is needed to
-work around this.
-
-cd libmad-0.15.1b
-./configure
-make
-gcc -shared -Wl,-export-all -Wl,--out-implib=libmad.dll.a -o cygmad-0.dll version.o fixed.o bit.o timer.o stream.o frame.o synth.o decoder.o layer12.o layer3.o huffman.o
-cp cygmad-0.dll /path/to/sox/libmad.dll
-
-Alternatively, the MAD configure script can be patched to allow building and
-installing libmad under standard cygwin directories.
-
---- ../libmad-0.15.1b.orig/configure.ac	2004-01-23 03:41:32.000000000 -0600
-+++ configure.ac	2009-05-25 22:44:50.846400000 -0500
-@@ -51,17 +51,17 @@
- 	    esac
-     esac
- 
--dnl    case "$host" in
--dnl	*-*-cygwin* | *-*-mingw*)
--dnl	    LDFLAGS="$LDFLAGS -no-undefined -mdll"
--dnl	    ;;
--dnl    esac
-+    case "$host" in
-+	*-*-cygwin* | *-*-mingw*)
-+	    LDFLAGS="$LDFLAGS -no-undefined"
-+	    ;;
-+    esac
- fi
- 
- dnl Support for libtool.
- 
- dnl AC_DISABLE_SHARED
--dnl AC_LIBTOOL_WIN32_DLL
-+AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
- 
- AC_SUBST(LIBTOOL_DEPS)
---- end diff
-
-cd libmad-0.15.1b
-patch -p0 < configure.ac.diff
-touch NEWS AUTHORS ChangeLog
-autoreconf -i -f
-./configure
-make
-cp .libs/cymad-0.dll /path/to/sox/libmad.dll
-
-It may also be possible to create DLL's using MS VC++ since both
-libraries include VC++ project files.  Lame creates a library
-call lame_enc.dll which does not correctly export VBR symbols
-and MAD does not export any symbols.  Therefore, cygwin is simpliest
-and is suggested method.
+SoX
+---
+
+This file contains information specific to the Win32 version of SoX.
+Please refer to the README file for general information.
+
+The binary SOX.EXE can be installed anywhere you desire.  The only
+restriction is that the included CYGWIN1.DLL and CYGGOMP-1.DLL must be 
+located in the same directory as SOX.EXE or somewhere within your PATH.
+
+SoX Helper Applications
+-----------------------
+
+SoX also includes support for SOXI.EXE, PLAY.EXE and REC.EXE and their
+behaviors are documented in included PDF's.  They have the same
+install restrictions as SOX.EXE.
+
+SOXI.EXE, PLAY.EXE, and REC.EXE are not distributed with this package to 
+reduce size requirements. They are, in fact, only copies of the original
+SOX.EXE binary which changes SOX.EXE's behavior based on the
+executable's filename.
+
+If you wish to make use of these utils then you can create them
+yourself.
+
+copy sox.exe soxi.exe
+copy sox.exe play.exe
+copy sox.exe rec.exe
+
+If you are concerned with disk space, the play and record
+functionality can be equated using the "-d" option with SOX.EXE.  soxi
+functionality can be equated using the "--info" option with SOX.EXE. The
+rough syntax is:
+
+play: sox [input files and options] -d [effects]
+rec: sox -d [output file and options] [effects]
+soxi: sox --info [input files and options]
+
+wget
+----
+
+SoX can make use of the wget command line utility to load files over
+the internet.  A binary copy of wget has been included with this
+package of SoX for your convience.
+
+For SoX to make use of wget, it must be located either in your PATH or
+within the same directory that SoX is ran from.
+
+Custom configuration of wget can be made by editing the file wget.ini
+contained in the same directory as wget.exe.
+
+Please consult wget's homepage for access to source code as well as
+further instructions on configuring.
+
+http://www.gnu.org/software/wget
+
+Acknowledgements
+----------------
+
+SOX.EXE included in this package makes use of the following projects.
+See the cygbuild script included with the source code package for
+further information on how it was compiled and packaged.
+
+  SoX - http://sox.sourceforge.net
+
+  Ogg Vorbis - http://www.vorbis.com
+
+  FLAC - http://flac.sourceforge.net
+
+  libsndfile - http://www.mega-nerd.com/libsndfile
+
+  WavPack - http://www.wavpack.com
+
+  PNG - http://www.libpng.org/pub/png
+
+Enjoy,
+The SoX Development Team
+
+Appendix - MP3 Support
+----------------------
+
+SoX contains support for reading and writing MP3 files but does not ship
+with the DLL's that perform decoding and encoding of MP3 data because
+of patent restrictions.  For further details, refer to:
+
+http://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues
+
+MP3 support can be enabled by placing Lame encoding DLL and/or
+MAD decoding DLL into the same directory as SOX.EXE.  These
+can be compiled yourself, may turn up on searches of the internet
+or may be included with other MP3 applications already installed
+on your system. Try searching for cygmp3lame-0.dll, libmp3lame.dll, 
+cygmad-0.dll, and libmad.dll.
+
+Instructions are included here for using Cygwin to create the DLL's. 
+It is assumed you already have cygwin installed on your system
+with its optional gcc compiler installed.  The commands are ran from
+bash shell cygwin installs.
+
+Obtain the latest Lame and MAD source code from approprate locations.
+
+Lame MP3 encoder  http://lame.sourceforge.net
+MAD MP3 decoder   http://www.underbit.com/products/mad 
+
+cd lame-398-2
+./configure
+make
+cp libmp3lame/.libs/cygmp3lame-0.dll /path/to/sox/libmp3lame.dll
+
+MAD library up to 0.15.1b has a bug in configure that will not allow
+building DLL under cygwin.  So an additional command is needed to
+work around this.
+
+cd libmad-0.15.1b
+./configure
+make
+gcc -shared -Wl,-export-all -Wl,--out-implib=libmad.dll.a -o cygmad-0.dll version.o fixed.o bit.o timer.o stream.o frame.o synth.o decoder.o layer12.o layer3.o huffman.o
+cp cygmad-0.dll /path/to/sox/libmad.dll
+
+Alternatively, the MAD configure script can be patched to allow building and
+installing libmad under standard cygwin directories.
+
+--- ../libmad-0.15.1b.orig/configure.ac	2004-01-23 03:41:32.000000000 -0600
++++ configure.ac	2009-05-25 22:44:50.846400000 -0500
+@@ -51,17 +51,17 @@
+ 	    esac
+     esac
+ 
+-dnl    case "$host" in
+-dnl	*-*-cygwin* | *-*-mingw*)
+-dnl	    LDFLAGS="$LDFLAGS -no-undefined -mdll"
+-dnl	    ;;
+-dnl    esac
++    case "$host" in
++	*-*-cygwin* | *-*-mingw*)
++	    LDFLAGS="$LDFLAGS -no-undefined"
++	    ;;
++    esac
+ fi
+ 
+ dnl Support for libtool.
+ 
+ dnl AC_DISABLE_SHARED
+-dnl AC_LIBTOOL_WIN32_DLL
++AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+ 
+ AC_SUBST(LIBTOOL_DEPS)
+--- end diff
+
+cd libmad-0.15.1b
+patch -p0 < configure.ac.diff
+touch NEWS AUTHORS ChangeLog
+autoreconf -i -f
+./configure
+make
+cp .libs/cymad-0.dll /path/to/sox/libmad.dll
--- a/msvc9/Readme.txt
+++ b/msvc9/Readme.txt
@@ -7,51 +7,79 @@
 at runtime if they are available.
 
 How to build:
+
 1. Check out the SoX CVS code into a directory named sox.
+
 2. Extract the source code for the other libraries next to the sox
-directory. Remove the version numbers from the directory names.
--- flac-1.2.1.tar.gz extracted into directory flac
--- lame-398-2.tar.gz extracted into directory lame
--- libid3tag-0.15.1b.tar.gz extracted into directory libid3tag
--- libmad-0.15.0b.tar.gz extracted into directory libmad
--- libogg-1.1.4.tar.gz extracted into directory libogg
--- libpng-1.2.39-no-config.tar.gz extracted into directory libpng
--- libsndfile-1.0.20.tar.gz extracted into directory libsndfile
--- libvorbis-1.2.3.tar.gz extracted into directory libvorbis
--- wavpack-4.50.1.tar.gz extracted into directory wavpack
--- zlib-1.2.3.tar.gz extracted into directory zlib
-3. Open the sox\msvc9\SoX.sln solution and build.
-7. The resulting executable files will be in sox\msvc9\Debug or
-sox\msvc9\Release. The resulting sox.exe will dynamically link to
-libmp3lame.dll, libmad.dll, libamrnb-3.dll, and libamrwb-3.dll if they are
-available, but will run without them (though the corresponding features will
-be unavailable if they are not present).
+   directory. Remove the version numbers from the directory names.
+   -- flac-1.2.1.tar.gz extracted into directory flac
+   -- lame-398-2.tar.gz extracted into directory lame
+   -- libid3tag-0.15.1b.tar.gz extracted into directory libid3tag
+   -- libmad-0.15.0b.tar.gz extracted into directory libmad
+   -- libogg-1.1.4.tar.gz extracted into directory libogg
+   -- libpng-1.2.39-no-config.tar.gz extracted into directory libpng
+   -- libsndfile-1.0.20.tar.gz extracted into directory libsndfile
+   -- libvorbis-1.2.3.tar.gz extracted into directory libvorbis
+   -- wavpack-4.50.1.tar.gz extracted into directory wavpack
+   -- zlib-1.2.3.tar.gz extracted into directory zlib
 
+3. Open the sox\msvc9\SoX.sln solution.
+
+4. If any of the above libraries are not available or not wanted, adjust the
+   corresponding settings in the soxconfig.h file (in the LibSoX project inside
+   the Config Files folder) and remove the corresponding project from the
+   solution.
+
+5. Build the solution.
+
+6. The resulting executable files will be in sox\msvc9\Debug or
+   sox\msvc9\Release. The resulting sox.exe will dynamically link to
+   libmp3lame.dll, libmad.dll, libamrnb-3.dll, and libamrwb-3.dll if they are
+   available, but will run without them (though the corresponding features will
+   be unavailable if they are not present).
+
 Points to note:
+
+- The libsndfile-1.0.20.tar.gz package does not include the sndfile.h header
+  file. Normally, before compiling libsndfile, you would create sndfile.h
+  (either by processing it via autoconf, by downloading a copy, or by renaming
+  sndfile.h.in). However, this SoX solution includes its own version of
+  sndfile.h, so you should not create a sndfile.h under the libsndfile folder.
+  To repeat: you should extract a clean copy of libsndfile-1.0.20.tar.gz, and
+  should not add, process, or rename any files.
+
 - The included libsox project enables OpenMP support. You can disable this
-in the libsox project properties under Configuration Properties, C/C++,
-Language, OpenMP support. If you don't disable it, you will need
-vcomp90.dll and Microsoft.VC90.OpenMP.manifest either installed on your
-machine or copied into the directory next to sox.exe. If you have OpenMP
-support in your copy of Visual Studio, these files can be found here:
-c:\Program Files\Microsoft Visual Studio 9.0\vc\redist\x86\Microsoft.VC90.OPENMP.
-Note that some editions of Visual Studio might not include OpenMP support.
+  in the libsox project properties under Configuration Properties, C/C++,
+  Language, OpenMP support. If you don't disable it, you will need
+  vcomp90.dll and Microsoft.VC90.OpenMP.manifest either installed on your
+  machine or copied into the directory next to sox.exe. If you have OpenMP
+  support in your copy of Visual Studio, these files can be found here:
+
+  c:\Program Files\Microsoft Visual Studio 9.0\
+     vc\redist\x86\Microsoft.VC90.OPENMP
+
+  Note that some editions of Visual Studio might not include OpenMP support.
+
 - The included projects do not enable SSE2. You can enable this in the project
-properties under Configuration Properties, C/C++, Code Generation, Enable
-Enhanced Instruction Set. Note that some editions of Visual Studio might
-not include Enhanced Instruction Set support.
-- The included projects set the floating-point model to "fast". This means
-that the compiler is free to optimize floating-point operations. For
-example, the compiler might optimize the expression (14.0 * x / 7.0) into
-(x * 2.0). In addition, the compiler is allowed to use 80-bit
-floating-point registers to store temporary values (instead of rounding
-each intermediate result to a 32-bit or 64-bit value. In some cases, these
-optimizations can change the results of floating-point calculations. If you
-run into trouble, you can change the settings to one of the other values.
-"precise" avoids any optimization that might change the result but keeps
-optimizations that might give more accurate results (such as using 80-bit
-temporary register values). "strict" avoids any optimization that might
-change the result and rounds every intermediate result to the requested
-precision. You can change this setting in the project properties under
-Configuration Properties, C/C++, Code Generation, Floating Point Model.
+  properties under Configuration Properties, C/C++, Code Generation, Enable
+  Enhanced Instruction Set. Note that some editions of Visual Studio might
+  not include Enhanced Instruction Set support.
 
+- The included projects set the floating-point model to "fast". This means
+  that the compiler is free to optimize floating-point operations. For
+  example, the compiler might optimize the expression (14.0 * x / 7.0) into
+  (x * 2.0). In addition, the compiler is allowed to leave expression results
+  in floating-point registers to store temporary values instead of rounding
+  each intermediate result to a 32-bit or 64-bit value. In some cases, these
+  optimizations can change the results of floating-point calculations. If you
+  need more precise results, you can change this optimization setting can be
+  changed to one of the other values. The "precise" setting avoids any
+  optimization that might change the result (preserves the order of all
+  operations) but keeps optimizations that might give more accurate results
+  (such as using more precision than necessary for intermediate values if doing
+  so results in faster code). The "strict" setting avoids any optimization that
+  might change the result in any way contrary to the C/C++ standard and rounds
+  every intermediate result to the requested precision according to standard
+  floating-point rounding rules. You can change this setting in the project
+  properties under Configuration Properties, C/C++, Code Generation, Floating
+  Point Model.