Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Secret Rabbit Code (aka libsamplerate) Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:
Chris@0: SRC.png Chris@0:
Chris@0: Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:
Chris@0:
Chris@0: Chris@0: Chris@0:
Chris@0:
Chris@0: Chris@0:

Compiling on Win32.

Chris@0:

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

Chris@0:

Chris@0: To build the examples programs you will need to download the precompiled Chris@0: win32 or win64 Chris@0: libsndfile Chris@0: binary and install them. Chris@0: Chris@0:

Chris@0:

Chris@0: Making the libsamplerate DLL on Win32 involves the following: Chris@0:

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

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

Chris@0: Chris@0:


Compile Problems

Chris@0:

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

Chris@0: Chris@0:

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

Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:
Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: