fix conflicting declarations

fix build
This commit is contained in:
derselbst 2017-10-30 11:53:02 +01:00
parent 1da426dcfd
commit 681f62ce4d
10 changed files with 17 additions and 14 deletions

View file

@ -31,7 +31,7 @@ extern "C" {
*/
FLUIDSYNTH_API fluid_midi_event_t* new_fluid_midi_event(void);
FLUIDSYNTH_API int delete_fluid_midi_event(fluid_midi_event_t* event);
FLUIDSYNTH_API void delete_fluid_midi_event(fluid_midi_event_t* event);
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t* evt, int type);
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t* evt);
@ -84,7 +84,7 @@ typedef int (*handle_midi_event_func_t)(void* data, fluid_midi_event_t* event);
FLUIDSYNTH_API fluid_midi_router_t* new_fluid_midi_router(fluid_settings_t* settings,
handle_midi_event_func_t handler,
void* event_handler_data);
FLUIDSYNTH_API int delete_fluid_midi_router(fluid_midi_router_t* handler);
FLUIDSYNTH_API void delete_fluid_midi_router(fluid_midi_router_t* handler);
FLUIDSYNTH_API int fluid_midi_router_set_default_rules (fluid_midi_router_t *router);
FLUIDSYNTH_API int fluid_midi_router_clear_rules (fluid_midi_router_t *router);
FLUIDSYNTH_API int fluid_midi_router_add_rule (fluid_midi_router_t *router,
@ -122,7 +122,7 @@ enum fluid_player_status
};
FLUIDSYNTH_API fluid_player_t* new_fluid_player(fluid_synth_t* synth);
FLUIDSYNTH_API int delete_fluid_player(fluid_player_t* player);
FLUIDSYNTH_API void delete_fluid_player(fluid_player_t* player);
FLUIDSYNTH_API int fluid_player_add(fluid_player_t* player, const char *midifile);
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t* player, const void *buffer, size_t len);
FLUIDSYNTH_API int fluid_player_play(fluid_player_t* player);

View file

@ -58,7 +58,7 @@ int fluid_ramsfont_izone_set_loop(fluid_ramsfont_t* sfont,
int on, float loopstart, float loopend);
FLUIDSYNTH_API fluid_sample_t* new_fluid_ramsample(void);
FLUIDSYNTH_API int delete_fluid_ramsample(fluid_sample_t* sample);
FLUIDSYNTH_API void delete_fluid_ramsample(fluid_sample_t* sample);
FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t* sample, const char *name);
FLUIDSYNTH_API
int fluid_sample_set_sound_data(fluid_sample_t* sample, short *data,

View file

@ -63,7 +63,7 @@ struct _fluid_synth_channel_info_t
};
FLUIDSYNTH_API fluid_synth_t* new_fluid_synth(fluid_settings_t* settings);
FLUIDSYNTH_API int delete_fluid_synth(fluid_synth_t* synth);
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t* synth);
FLUIDSYNTH_API fluid_settings_t* fluid_synth_get_settings(fluid_synth_t* synth);

View file

@ -28,7 +28,7 @@
typedef struct _fluid_midi_parser_t fluid_midi_parser_t;
fluid_midi_parser_t* new_fluid_midi_parser(void);
int delete_fluid_midi_parser(fluid_midi_parser_t* parser);
void delete_fluid_midi_parser(fluid_midi_parser_t* parser);
fluid_midi_event_t* fluid_midi_parser_parse(fluid_midi_parser_t* parser, unsigned char c);
@ -248,7 +248,7 @@ struct _fluid_track_t {
typedef struct _fluid_track_t fluid_track_t;
fluid_track_t* new_fluid_track(int num);
int delete_fluid_track(fluid_track_t* track);
void delete_fluid_track(fluid_track_t* track);
int fluid_track_set_name(fluid_track_t* track, char* name);
char* fluid_track_get_name(fluid_track_t* track);
int fluid_track_add_event(fluid_track_t* track, fluid_midi_event_t* evt);

View file

@ -9,6 +9,7 @@
Translated to C by Peter Hanappe, Mai 2001
*/
#include "fluid_sys.h"
#include "fluid_rev.h"
/***************************************************************

View file

@ -52,7 +52,7 @@ static void fluid_ramsfont_iteration_start (fluid_ramsfont_t* sfont);
static int fluid_ramsfont_iteration_next (fluid_ramsfont_t* sfont,
fluid_preset_t* preset);
static fluid_rampreset_t* new_fluid_rampreset(fluid_ramsfont_t* sfont);
static int delete_fluid_rampreset (fluid_rampreset_t* preset);
static void delete_fluid_rampreset (fluid_rampreset_t* preset);
static int fluid_rampreset_get_banknum (fluid_rampreset_t* preset);
static int fluid_rampreset_get_num (fluid_rampreset_t* preset);
static const char *fluid_rampreset_get_name (fluid_rampreset_t* preset);
@ -251,7 +251,7 @@ delete_fluid_ramsfont (fluid_ramsfont_t* sfont)
{
fluid_list_t *list;
fluid_rampreset_t* preset;
fluid_return_if_fail(sfont != NULL);
fluid_return_val_if_fail(sfont != NULL, FLUID_OK);
/* Check that no samples are currently used */
for (list = sfont->sample; list; list = fluid_list_next(list)) {
@ -549,7 +549,7 @@ delete_fluid_rampreset (fluid_rampreset_t* preset)
zone = preset->zone;
while (zone != NULL) {
preset->zone = zone->next;
delete_fluid_preset_zone(zone) != FLUID_OK);
delete_fluid_preset_zone(zone);
zone = preset->zone;
}

View file

@ -87,7 +87,7 @@ struct _fluid_channel_t
fluid_channel_t* new_fluid_channel(fluid_synth_t* synth, int num);
void fluid_channel_init_ctrl(fluid_channel_t* chan, int is_all_ctrl_off);
int delete_fluid_channel(fluid_channel_t* chan);
void delete_fluid_channel(fluid_channel_t* chan);
void fluid_channel_reset(fluid_channel_t* chan);
int fluid_channel_set_preset(fluid_channel_t* chan, fluid_preset_t* preset);
fluid_preset_t* fluid_channel_get_preset(fluid_channel_t* chan);

View file

@ -503,10 +503,11 @@ fluid_sample_timer_t* new_fluid_sample_timer(fluid_synth_t* synth, fluid_timer_c
void delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer)
{
fluid_sample_timer_t** ptr;
fluid_return_if_fail(synth != NULL);
fluid_return_if_fail(timer != NULL);
fluid_sample_timer_t** ptr = &synth->sample_timers;
ptr = &synth->sample_timers;
while (*ptr) {
if (*ptr == timer) {
*ptr = timer->next;

View file

@ -200,7 +200,7 @@ int fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double le
double speed, double depth_ms, int type);
fluid_sample_timer_t* new_fluid_sample_timer(fluid_synth_t* synth, fluid_timer_callback_t callback, void* data);
int delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer);
void delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer);
void fluid_synth_api_enter(fluid_synth_t* synth);
void fluid_synth_api_exit(fluid_synth_t* synth);

View file

@ -26,6 +26,7 @@
#include "fluid_sys.h"
#include "fluid_list.h"
@ -42,9 +43,9 @@ new_fluid_list(void)
void
delete_fluid_list(fluid_list_t *list)
{
fluid_list_t *next;
fluid_return_if_fail(list != NULL);
fluid_list_t *next;
while (list) {
next = list->next;
FLUID_FREE(list);