cannam@126:
cannam@126:
Compiling on Win32.
cannam@126:
cannam@126: For Win32 there is a Microsoft Visual C++ compatible makefile in the Win32\
cannam@126: directory and a MSDOS batch file in the top level directory of the distribution.
cannam@126:
cannam@126:
cannam@126: To build the examples programs you will need to download the precompiled
cannam@126: win32 or win64
cannam@126: libsndfile
cannam@126: binary and install them.
cannam@126:
cannam@126:
cannam@126:
cannam@126: Making the libsamplerate DLL on Win32 involves the following:
cannam@126:
cannam@126:
cannam@126: - Using WinZip in the GUI, open the libsamplerate-0.X.Y.tar.gz file and
cannam@126: extract the files into a directory. The following example assumes
cannam@126: C:\.
cannam@126:
- In the directory containing the extracted files, find the file
cannam@126: Win32\Makefile.msvc and open it in a text editor (ie Notepad or
cannam@126: similar).
cannam@126:
- Find the line which starts with MSVCDir and modify the directory
cannam@126: path to point to the location of MSVC++ on your machine. This allows the
cannam@126: makefile to inform the compiler of the location of the standard header
cannam@126: files.
cannam@126:
- Copy libsndfile-1.dll, libsndfile-1.lib and
cannam@126: libsndfile-1.def from the directory libsndfile was installed in
cannam@126: to the the directory containing libsamplerate.
cannam@126:
- Copy the header file include/sndfile.h from where libsndfile was
cannam@126: installed to the Win32 directory under the libsamplerate
cannam@126: directory.
cannam@126:
- Open a Command Shell and cd into the libsamplerate-0.X.Y directory.
cannam@126:
- Make sure that the program nmake (which is part of the MSCV++
cannam@126: package) is in a directory which is part of your PATH variable.
cannam@126:
- Type in the command
cannam@126:
C:\libsamplerate-0.X.Y> make
cannam@126:
cannam@126: and press <return>. You should now see a a large number of compile
cannam@126: commands as libsamplerate.dll is built.
cannam@126: - To check that the built DLL has been compiled correctly type in and run the
cannam@126: command
cannam@126:
C:\libsamplerate-0.X.Y> make check
cannam@126:
cannam@126: which will compile a set of test programs and run them.
cannam@126: If any of the programs fail the error message will be help in debugging
cannam@126: the problem.
cannam@126: (Note that some of the tests require libsndfile or libfftw/librfftw and
cannam@126: are not able to run on Win32).
cannam@126:
cannam@126:
cannam@126: At the end of the above procedure, you will find the DLL, libsamplerate.dll, a
cannam@126: LIB file libsamplerate.lib in the current directory. These two files, along
cannam@126: with the header file samplerate.h (in the src\ directory) are all that
cannam@126: you need to copy to your project in order to use libsamplerate.
cannam@126:
cannam@126:
cannam@126:
Compile Problems
cannam@126:
cannam@126: If you run into compile problems using the above procedure, you should
cannam@126: join the main mailing list
cannam@126: and post your problem and/or questions there.
cannam@126: Please include any error messages generated during step 6 above.
cannam@126:
cannam@126:
cannam@126:
cannam@126: If you are using some other method to compile the libsamplerate DLL you are
cannam@126: probably on your own.
cannam@126:
cannam@126:
cannam@126:
cannam@126:
cannam@126:
cannam@126:
cannam@126:
cannam@126:
cannam@126: