From 3cea11de7fd20e4d05d56d2334d74d88e81b76bb Mon Sep 17 00:00:00 2001 From: carlo-bramini Date: Sat, 21 Oct 2017 18:23:23 +0200 Subject: [PATCH] Replace use of glib types --- src/midi/fluid_seq.c | 8 ++++---- src/synth/fluid_synth.c | 7 +++---- src/utils/fluid_hash.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/midi/fluid_seq.c b/src/midi/fluid_seq.c index 02ebaf18..62cd8ade 100644 --- a/src/midi/fluid_seq.c +++ b/src/midi/fluid_seq.c @@ -42,8 +42,8 @@ /* Private data for SEQUENCER */ struct _fluid_sequencer_t { unsigned int startMs; - gint currentMs; - gboolean useSystemTimer; + int currentMs; + int useSystemTimer; double scale; // ticks per second fluid_list_t* clients; short clientsID; @@ -121,7 +121,7 @@ new_fluid_sequencer2 (int use_system_timer) FLUID_MEMSET(seq, 0, sizeof(fluid_sequencer_t)); seq->scale = 1000; // default value - seq->useSystemTimer = use_system_timer ? TRUE : FALSE; + seq->useSystemTimer = use_system_timer ? 1 : 0; seq->startMs = seq->useSystemTimer ? fluid_curtime() : 0; seq->clients = NULL; seq->clientsID = 0; @@ -196,7 +196,7 @@ delete_fluid_sequencer (fluid_sequencer_t* seq) int fluid_sequencer_get_use_system_timer (fluid_sequencer_t* seq) { - return seq->useSystemTimer ? 1 : 0; + return seq->useSystemTimer; } diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 84fc31e0..24ca098c 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -3353,13 +3353,12 @@ fluid_synth_start_voice(fluid_synth_t* synth, fluid_voice_t* voice) void fluid_synth_add_sfloader(fluid_synth_t* synth, fluid_sfloader_t* loader) { - gboolean sfont_already_loaded; - fluid_return_if_fail (synth != NULL); fluid_return_if_fail (loader != NULL); fluid_synth_api_enter(synth); - sfont_already_loaded = synth->sfont_info != NULL; - if (!sfont_already_loaded) + + /* Test if sfont is already loaded */ + if (synth->sfont_info == NULL) synth->loaders = fluid_list_prepend(synth->loaders, loader); fluid_synth_api_exit(synth); } diff --git a/src/utils/fluid_hash.c b/src/utils/fluid_hash.c index af6fb704..e0c1cd7c 100644 --- a/src/utils/fluid_hash.c +++ b/src/utils/fluid_hash.c @@ -53,7 +53,7 @@ typedef struct /* Excerpt from glib gprimes.c */ -static const guint primes[] = +static const unsigned int primes[] = { 11, 19,