From 297372d6d9116adb7659ea5e723aed7e44c7aa4a Mon Sep 17 00:00:00 2001 From: derselbst Date: Thu, 25 Jan 2018 20:39:11 +0100 Subject: [PATCH] rename GEN_BALANCE to GEN_CUSTOM_BALANCE --- include/fluidsynth/gen.h | 2 +- src/synth/fluid_gen.c | 2 +- src/synth/fluid_mod.c | 2 +- src/synth/fluid_synth.c | 2 +- src/synth/fluid_voice.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/fluidsynth/gen.h b/include/fluidsynth/gen.h index 056b67a8..1db86d26 100644 --- a/include/fluidsynth/gen.h +++ b/include/fluidsynth/gen.h @@ -99,7 +99,7 @@ enum fluid_gen_type { * is used, however, as the destination for the default pitch wheel * modulator. */ GEN_PITCH, /**< Pitch @note Not a real SoundFont generator */ - GEN_BALANCE, /**< Balance @note Not a real SoundFont generator */ + GEN_CUSTOM_BALANCE, /**< Balance @note Not a real SoundFont generator */ #ifndef __DOXYGEN__ GEN_LAST /**< @internal Value defines the count of generators (#fluid_gen_type) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */ #endif diff --git a/src/synth/fluid_gen.c b/src/synth/fluid_gen.c index d345c80a..203e0f59 100644 --- a/src/synth/fluid_gen.c +++ b/src/synth/fluid_gen.c @@ -86,7 +86,7 @@ static const fluid_gen_info_t fluid_gen_info[] = { { GEN_EXCLUSIVECLASS, 0, 0, 0.0f, 0.0f, 0.0f }, { GEN_OVERRIDEROOTKEY, 1, 0, 0.0f, 127.0f, -1.0f }, { GEN_PITCH, 1, 0, 0.0f, 127.0f, 0.0f }, - { GEN_BALANCE, 1, 0, -960.0f, 960.0f, 0.0f } + { GEN_CUSTOM_BALANCE, 1, 0, -960.0f, 960.0f, 0.0f } }; diff --git a/src/synth/fluid_mod.c b/src/synth/fluid_mod.c index 41399380..99148708 100644 --- a/src/synth/fluid_mod.c +++ b/src/synth/fluid_mod.c @@ -516,7 +516,7 @@ void fluid_dump_modulator(fluid_mod_t * mod){ case GEN_CHORUSSEND: printf("Chorus send"); break; case GEN_REVERBSEND: printf("Reverb send"); break; case GEN_PAN: printf("pan"); break; - case GEN_BALANCE: printf("balance"); break; + case GEN_CUSTOM_BALANCE: printf("balance"); break; case GEN_ATTENUATION: printf("att"); break; default: printf("dest %i",dest); }; /* switch dest */ diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 56ba3eef..b271a0c0 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -419,7 +419,7 @@ fluid_synth_init(void) | FLUID_MOD_POSITIVE /* D=0 */ ); fluid_mod_set_source2(&custom_balance_mod, 0, 0); - fluid_mod_set_dest(&custom_balance_mod, GEN_BALANCE); /* Destination: stereo balance */ + fluid_mod_set_dest(&custom_balance_mod, GEN_CUSTOM_BALANCE); /* Destination: stereo balance */ /* Amount: 96 dB of attenuation (on the opposite channel) */ fluid_mod_set_amount(&custom_balance_mod, 960.0); } diff --git a/src/synth/fluid_voice.c b/src/synth/fluid_voice.c index 07c60728..108e89e7 100644 --- a/src/synth/fluid_voice.c +++ b/src/synth/fluid_voice.c @@ -538,7 +538,7 @@ fluid_voice_calculate_runtime_synthesis_parameters(fluid_voice_t* voice) /* GEN_FINETUNE [1] #52 */ GEN_OVERRIDEROOTKEY, /* #58 */ GEN_PITCH, /* --- */ - GEN_BALANCE /* --- */ + GEN_CUSTOM_BALANCE /* --- */ }; /* When the voice is made ready for the synthesis process, a lot of @@ -692,10 +692,10 @@ fluid_voice_update_param(fluid_voice_t* voice, int gen) switch (gen) { case GEN_PAN: - case GEN_BALANCE: + case GEN_CUSTOM_BALANCE: /* range checking is done in the fluid_pan and fluid_balance functions */ voice->pan = fluid_voice_gen_value(voice, GEN_PAN); - voice->balance = fluid_voice_gen_value(voice, GEN_BALANCE); + voice->balance = fluid_voice_gen_value(voice, GEN_CUSTOM_BALANCE); /* left amp */ UPDATE_RVOICE_BUFFERS2(fluid_rvoice_buffers_set_amp, 0,