rename fluid_mod_new|delete() to match naming conventions

This commit is contained in:
derselbst 2017-11-27 16:56:51 +01:00
parent c94f747c04
commit 9900d5f151
5 changed files with 12 additions and 11 deletions

View file

@ -91,6 +91,7 @@ Changes in FluidSynth 2.0.0 concerning developers:
- the shell command handler was decoupled internally, as a consequence the param list of new_fluid_server() and new_fluid_cmd_handler() was adapted - the shell command handler was decoupled internally, as a consequence the param list of new_fluid_server() and new_fluid_cmd_handler() was adapted
- reverb: roomsize is now limited to an upper threshold of 1.0 - reverb: roomsize is now limited to an upper threshold of 1.0
- use unique device names for the "audio.portaudio.device" setting - use unique device names for the "audio.portaudio.device" setting
- rename fluid_mod_new() and fluid_mod_delete() to match naming conventions: new_fluid_mod() and delete_fluid_mod()
<br /><br /> <br /><br />
- add "synth.volenv" a setting for volume envelope processing - add "synth.volenv" a setting for volume envelope processing
- add "midi.autoconnect" a setting for automatically connecting fluidsynth to available MIDI input ports - add "midi.autoconnect" a setting for automatically connecting fluidsynth to available MIDI input ports

View file

@ -68,8 +68,8 @@ enum fluid_mod_src
FLUID_MOD_PITCHWHEELSENS = 16 /**< Pitch wheel sensitivity */ FLUID_MOD_PITCHWHEELSENS = 16 /**< Pitch wheel sensitivity */
}; };
FLUIDSYNTH_API fluid_mod_t* fluid_mod_new(void); FLUIDSYNTH_API fluid_mod_t* new_fluid_mod(void);
FLUIDSYNTH_API void fluid_mod_delete(fluid_mod_t * mod); FLUIDSYNTH_API void delete_fluid_mod(fluid_mod_t * mod);
FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t* mod, int src, int flags); FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t* mod, int src, int flags);
FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t* mod, int src, int flags); FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t* mod, int src, int flags);

View file

@ -1221,7 +1221,7 @@ delete_fluid_preset_zone(fluid_preset_zone_t* zone)
{ {
tmp = mod; tmp = mod;
mod = mod->next; mod = mod->next;
fluid_mod_delete (tmp); delete_fluid_mod (tmp);
} }
FLUID_FREE (zone->name); FLUID_FREE (zone->name);
@ -1272,7 +1272,7 @@ fluid_preset_zone_import_sfont(fluid_preset_zone_t* zone, SFZone *sfzone, fluid_
for (count = 0, r = sfzone->mod; r != NULL; count++) { for (count = 0, r = sfzone->mod; r != NULL; count++) {
SFMod* mod_src = (SFMod *)r->data; SFMod* mod_src = (SFMod *)r->data;
fluid_mod_t * mod_dest = fluid_mod_new(); fluid_mod_t * mod_dest = new_fluid_mod();
int type; int type;
if (mod_dest == NULL){ if (mod_dest == NULL){
@ -1613,7 +1613,7 @@ delete_fluid_inst_zone(fluid_inst_zone_t* zone)
{ {
tmp = mod; tmp = mod;
mod = mod->next; mod = mod->next;
fluid_mod_delete (tmp); delete_fluid_mod (tmp);
} }
FLUID_FREE (zone->name); FLUID_FREE (zone->name);
@ -1675,7 +1675,7 @@ fluid_inst_zone_import_sfont(fluid_inst_zone_t* zone, SFZone *sfzone, fluid_defs
int type; int type;
fluid_mod_t* mod_dest; fluid_mod_t* mod_dest;
mod_dest = fluid_mod_new(); mod_dest = new_fluid_mod();
if (mod_dest == NULL){ if (mod_dest == NULL){
return FLUID_FAILED; return FLUID_FAILED;
} }

View file

@ -383,7 +383,7 @@ fluid_mod_get_value(fluid_mod_t* mod, fluid_channel_t* chan, fluid_voice_t* voic
* @return New allocated modulator or NULL if out of memory * @return New allocated modulator or NULL if out of memory
*/ */
fluid_mod_t* fluid_mod_t*
fluid_mod_new() new_fluid_mod()
{ {
fluid_mod_t* mod = FLUID_NEW (fluid_mod_t); fluid_mod_t* mod = FLUID_NEW (fluid_mod_t);
if (mod == NULL) { if (mod == NULL) {
@ -398,7 +398,7 @@ fluid_mod_new()
* @param mod Modulator to free * @param mod Modulator to free
*/ */
void void
fluid_mod_delete (fluid_mod_t *mod) delete_fluid_mod (fluid_mod_t *mod)
{ {
FLUID_FREE(mod); FLUID_FREE(mod);
} }

View file

@ -931,7 +931,7 @@ delete_fluid_synth(fluid_synth_t* synth)
while (default_mod != NULL) { while (default_mod != NULL) {
mod = default_mod; mod = default_mod;
default_mod = mod->next; default_mod = mod->next;
fluid_mod_delete(mod); delete_fluid_mod(mod);
} }
fluid_rec_mutex_destroy(synth->mutex); fluid_rec_mutex_destroy(synth->mutex);
@ -1130,7 +1130,7 @@ fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode)
} }
/* Add a new modulator (no existing modulator to add / overwrite). */ /* Add a new modulator (no existing modulator to add / overwrite). */
new_mod = fluid_mod_new(); new_mod = new_fluid_mod();
if (new_mod == NULL) if (new_mod == NULL)
FLUID_API_RETURN(FLUID_FAILED); FLUID_API_RETURN(FLUID_FAILED);
@ -1175,7 +1175,7 @@ fluid_synth_remove_default_mod(fluid_synth_t* synth, const fluid_mod_t* mod)
{ {
last_mod->next = default_mod->next; last_mod->next = default_mod->next;
} }
fluid_mod_delete(default_mod); delete_fluid_mod(default_mod);
FLUID_API_RETURN(FLUID_OK); FLUID_API_RETURN(FLUID_OK);
} }
last_mod = default_mod; last_mod = default_mod;