fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] Compiling fluidsynth 1.1.1 with libsndfile support on Window


From: Felix Krause
Subject: [fluid-dev] Compiling fluidsynth 1.1.1 with libsndfile support on Windows
Date: Sat, 6 Mar 2010 01:16:17 +0100

Hi all,

I compiled Fluidsynth with libsndfile support on Windows, and I thought I'll 
post a little howto for those not familiar with Visual Studio.
Note that I used revision 284 from svn. If you want to compile the 1.1.1 
release, you also have to change the include "config.h" to "config_win32.h" in 
fluid_aufile.c.

Here is the step-by-step guide:

Stuff you need to download:
- Download the fluidsynth source (obviously). Unzip it into your VS projects 
folder.
- Download and execute the Win32 installer for libsndfile; install it into your 
VS projects folder: http://www.mega-nerd.com/libsndfile/#Download
- Download and install the latest DirectX SDK: 
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15
- Download the GLib Dev package and unzip it into your VB projects folder: 
http://www.gtk.org/download-windows.html

Configuring the VS project:
- Open the fluidsynth solution from winbuild
- Right click on the project you want to build and choose Properties. (eg if 
you want to build a dll, choose the project fluidsynth_dll)
- for Configuration choose "All Configurations" (you can also just modify the 
Release configuration, if you don't need to compile fluidsynth in Debug mode)
- In Configuration Properties->C/C++->General, you have to set the Additional 
Include Directories to:
                
..\..\include;"..\..\..\glib\include\glib-2.0";"..\..\..\glib\lib\glib-2.0\include";..\..\..\libsndfile\include
        (given that glib and libsndfile are located in the VS projects folder)
        If you get a "missing dsound.h", you also have to add the Include 
folder from the DirectX SDK here.
- Now for the libraries:
        In Linker->General, set the Additional Library Directories to:
                ..\..\..\libsndfile;..\..\..\glib\lib\
        Again, if you get an "dsound.lib missing" error, you also have to add 
the Libs\x86 folder from the DirectX SDK here.
        In Linker->Input, you have to add libsndfile-1.lib to Additional 
Dependencies.

Changing the code:
- As we want to have libsndfile support, open config_win32.h and add the lines
                #define AUFILE_SUPPORT 1
                #define LIBSNDFILE_SUPPORT 1
        (doesn't matter where you add these lines.)
- Now I had a strange syntax error while compiling. VS said:
                1>..\..\src\fluid_cmd.c(472) : error C2143: syntax error : 
missing ';' before 'type'
                1>..\..\src\fluid_cmd.c(473) : error C2143: syntax error : 
missing ';' before 'type'
        I don't really know what this error is about, as everything looks fine. 
However, I found a workaround (only do this if you get the same error!):
        double clicking on the error will take you to those two lines in 
fluid_cmd.c:
                int channum = atoi(av[0]);
                int value = atoi(av[1]);
        change them into:
                channum = atoi(av[0]);
                value = atoi(av[1]);
        now right behind the "{" in the same function, add:
                int channum;
                int value;

With all this done, fluidsynth compiled for me, and I had support for all the 
file formats libsndfile can handle.
Note that you need the glib and libsndfile dlls to run fluidsynth. The glib dll 
file isn't bundled in the dev package you already downloaded,
so the easiest way to get it is to download the binary package.

Cheers,
Felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]