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