dynamic_fluidsynth.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 12 Feb 2012 17:58:22 -0500
branchSDL-1.2
changeset 584 ea53a85853dd
parent 518 8bc9b5fd2aae
child 601 05123263dab3
permissions -rw-r--r--
Fixed 1418 - crash on double free if loading WAV file failed
     1 /*
     2   SDL_mixer:  An audio mixer library based on the SDL library
     3   Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 
    21   James Le Cuirot
    22   chewi@aura-online.co.uk
    23 */
    24 
    25 #ifdef USE_FLUIDSYNTH_MIDI
    26 
    27 #include <fluidsynth.h>
    28 
    29 typedef struct {
    30 	int loaded;
    31 	void *handle;
    32 
    33 	int (*delete_fluid_player)(fluid_player_t*);
    34 	void (*delete_fluid_settings)(fluid_settings_t*);
    35 	int (*delete_fluid_synth)(fluid_synth_t*);
    36 	int (*fluid_player_add)(fluid_player_t*, const char*);
    37 	int (*fluid_player_add_mem)(fluid_player_t*, const void*, size_t);
    38 	int (*fluid_player_get_status)(fluid_player_t*);
    39 	int (*fluid_player_play)(fluid_player_t*);
    40 	int (*fluid_player_set_loop)(fluid_player_t*, int);
    41 	int (*fluid_player_stop)(fluid_player_t*);
    42 	int (*fluid_settings_setnum)(fluid_settings_t*, const char*, double);
    43 	fluid_settings_t* (*fluid_synth_get_settings)(fluid_synth_t*);
    44 	void (*fluid_synth_set_gain)(fluid_synth_t*, float);
    45 	int (*fluid_synth_sfload)(fluid_synth_t*, const char*, int);
    46 	int (*fluid_synth_write_s16)(fluid_synth_t*, int, void*, int, int, void*, int, int);
    47 	fluid_player_t* (*new_fluid_player)(fluid_synth_t*);
    48 	fluid_settings_t* (*new_fluid_settings)(void);
    49 	fluid_synth_t* (*new_fluid_synth)(fluid_settings_t*);
    50 } fluidsynth_loader;
    51 
    52 extern fluidsynth_loader fluidsynth;
    53 
    54 #endif /* USE_FLUIDSYNTH_MIDI */
    55 
    56 extern int Mix_InitFluidSynth();
    57 extern void Mix_QuitFluidSynth();