fluidsynth.h
author Ozkan Sezer <sezeroz@gmail.com>
Thu, 11 Oct 2018 11:50:10 +0300
branchSDL-1.2
changeset 902 6c862e733898
parent 542 3de4970b36d4
child 601 05123263dab3
permissions -rw-r--r--
remove smpeg support completely and backport libmpg123 support instead.
chewi@506
     1
/*
slouken@518
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@518
     3
  Copyright (C) 1997-2012 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
#ifndef _FLUIDSYNTH_H_
chewi@506
    26
#define _FLUIDSYNTH_H_
chewi@506
    27
slouken@532
    28
#ifdef USE_FLUIDSYNTH_MIDI
slouken@532
    29
chewi@506
    30
#include "dynamic_fluidsynth.h"
chewi@506
    31
#include <SDL_rwops.h>
chewi@506
    32
#include <SDL_audio.h>
chewi@506
    33
chewi@506
    34
typedef struct {
chewi@506
    35
	SDL_AudioCVT convert;
chewi@506
    36
	fluid_synth_t *synth;
chewi@506
    37
	fluid_player_t* player;
chewi@506
    38
} FluidSynthMidiSong;
chewi@506
    39
chewi@506
    40
int fluidsynth_init(SDL_AudioSpec *mixer);
slouken@521
    41
FluidSynthMidiSong *fluidsynth_loadsong_RW(SDL_RWops *rw, int freerw);
chewi@506
    42
void fluidsynth_freesong(FluidSynthMidiSong *song);
chewi@506
    43
void fluidsynth_start(FluidSynthMidiSong *song);
chewi@506
    44
void fluidsynth_stop(FluidSynthMidiSong *song);
chewi@506
    45
int fluidsynth_active(FluidSynthMidiSong *song);
chewi@506
    46
void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume);
chewi@506
    47
int fluidsynth_playsome(FluidSynthMidiSong *song, void *stream, int len);
chewi@506
    48
slouken@532
    49
#endif /* USE_FLUIDSYNTH_MIDI */
slouken@532
    50
chewi@506
    51
#endif /* _FLUIDSYNTH_H_ */