cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: Secret Rabbit Code (aka libsamplerate) cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85:
cannam@85: SRC.png cannam@85:
cannam@85: cannam@85:
cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85:
cannam@85:
cannam@85: cannam@85: cannam@85:
cannam@85:
cannam@85: cannam@85:

Compiling on Win32.

cannam@85:

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

cannam@85:

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

cannam@85:

cannam@85: Making the libsamplerate DLL on Win32 involves the following: cannam@85:

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

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

cannam@85: cannam@85:


Compile Problems

cannam@85:

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

cannam@85: cannam@85:

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

cannam@85:
cannam@85: cannam@85: cannam@85: cannam@85: cannam@85: cannam@85:
cannam@85:
cannam@85: cannam@85: cannam@85: cannam@85: