SRC.png


Compiling on Win32.

For Win32 there is a Microsoft Visual C++ compatible makefile in the Win32\ directory and a MSDOS batch file in the top level directory of the distribution.

To build the examples programs you will need to download and compile libsndfile and there are instructions for compiling it on Win32 here. This is optional as SecretRabbitCode can be compiled and used with installing libsndfile.

Making the libsamplerate DLL on Win32 involves the following:

  1. Using WinZip in the GUI, open the libsamplerate-0.X.Y.tar.gz file and extract the files into a directory. The following example assumes C:\.
  2. In the directory containing the extracted files, find the file Win32\Makefile.msvc and open it in a text editor (ie Notepad or similar).
  3. Find the line which starts with MSVCDir and modify the directory path to point to the location of MSVC++ on your machine. This allows the makefile to inform the compiler of the location of the standard header files.
  4. Copy libsndfile.dll and libsndfile.lib from the directory libsndfile was compiled in to the the directory containing libsamplerate.
  5. Copy the header file Win32/sndfile.h to the Win32 directory under the libsamplerate directory.
  6. Open a DOS window (Win9X) or Command Shell (WinNT and WinXP?) and cd into the libsamplerate-0.X.Y directory.
  7. Make sure that the program nmake (which is part of the MSCV++ package) is in a directory which is part of your PATH variable.
  8. Type in the command
        C:\libsamplerate-0.X.Y> make
    		
    and press <return>. You should now see a a large number of compile commands as libsamplerate.dll is built.
  9. To check that the built DLL has been compiled correctly type in and run the command
        C:\libsamplerate-0.X.Y> make check
    		
    which will compile a set of test programs and run them. If any of the programs fail the error message will be help in debugging the problem. (Note that some of the tests require libsndfile or libfftw/librfftw and are not able to run on Win32).

At the end of the above procedure, you will find the DLL, libsamplerate.dll, a LIB file libsamplerate.lib in the current directory. These two files, along with the header file samplerate.h (in the src\ directory) are all that you need to copy to your project in order to use libsamplerate.


Compile Problems

If you run into compile problems using the above procedure, you should join the main mailing list and post your problem and/or questions there. Please include any error messages generated during step 6 above.

If you are using some other method to compile the libsamplerate DLL you are probably on your own.