fluidsynth.h
changeset 506 586ae09f8176
child 518 8bc9b5fd2aae
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/fluidsynth.h	Sun Mar 20 14:34:18 2011 +0000
     1.3 @@ -0,0 +1,46 @@
     1.4 +/*
     1.5 +    SDL_mixer:  An audio mixer library based on the SDL library
     1.6 +    Copyright (C) 1997-2011 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    James Le Cuirot
    1.23 +    chewi@aura-online.co.uk
    1.24 +*/
    1.25 +
    1.26 +#ifndef _FLUIDSYNTH_H_
    1.27 +#define _FLUIDSYNTH_H_
    1.28 +
    1.29 +#include "dynamic_fluidsynth.h"
    1.30 +#include <SDL_rwops.h>
    1.31 +#include <SDL_audio.h>
    1.32 +
    1.33 +typedef struct {
    1.34 +	SDL_AudioCVT convert;
    1.35 +	fluid_synth_t *synth;
    1.36 +	fluid_player_t* player;
    1.37 +} FluidSynthMidiSong;
    1.38 +
    1.39 +int fluidsynth_init(SDL_AudioSpec *mixer);
    1.40 +FluidSynthMidiSong *fluidsynth_loadsong(const char *midifile);
    1.41 +FluidSynthMidiSong *fluidsynth_loadsong_RW(SDL_RWops *rw);
    1.42 +void fluidsynth_freesong(FluidSynthMidiSong *song);
    1.43 +void fluidsynth_start(FluidSynthMidiSong *song);
    1.44 +void fluidsynth_stop(FluidSynthMidiSong *song);
    1.45 +int fluidsynth_active(FluidSynthMidiSong *song);
    1.46 +void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume);
    1.47 +int fluidsynth_playsome(FluidSynthMidiSong *song, void *stream, int len);
    1.48 +
    1.49 +#endif /* _FLUIDSYNTH_H_ */