mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-15 20:30:49 +00:00
optimize fluid_delete_synth()
This commit is contained in:
parent
b9421409aa
commit
02134d6959
3 changed files with 3 additions and 11 deletions
|
@ -1151,7 +1151,7 @@ new_fluid_preset_zone(char *name)
|
|||
/*
|
||||
* delete list of modulators.
|
||||
*/
|
||||
static void delete_fluid_list_mod(fluid_mod_t *mod)
|
||||
void delete_fluid_list_mod(fluid_mod_t *mod)
|
||||
{
|
||||
fluid_mod_t *tmp;
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ struct _fluid_preset_zone_t
|
|||
};
|
||||
|
||||
fluid_preset_zone_t *new_fluid_preset_zone(char *name);
|
||||
void delete_fluid_list_mod(fluid_mod_t *mod);
|
||||
void delete_fluid_preset_zone(fluid_preset_zone_t *zone);
|
||||
fluid_preset_zone_t *fluid_preset_zone_next(fluid_preset_zone_t *zone);
|
||||
int fluid_preset_zone_import_sfont(fluid_preset_zone_t *zone, SFZone *sfzone, fluid_defsfont_t *defssfont);
|
||||
|
|
|
@ -988,8 +988,6 @@ delete_fluid_synth(fluid_synth_t *synth)
|
|||
fluid_list_t *list;
|
||||
fluid_sfont_t *sfont;
|
||||
fluid_sfloader_t *loader;
|
||||
fluid_mod_t *default_mod;
|
||||
fluid_mod_t *mod;
|
||||
|
||||
fluid_return_if_fail(synth != NULL);
|
||||
|
||||
|
@ -1108,14 +1106,7 @@ delete_fluid_synth(fluid_synth_t *synth)
|
|||
#endif
|
||||
|
||||
/* delete all default modulators */
|
||||
default_mod = synth->default_mod;
|
||||
|
||||
while(default_mod != NULL)
|
||||
{
|
||||
mod = default_mod;
|
||||
default_mod = mod->next;
|
||||
delete_fluid_mod(mod);
|
||||
}
|
||||
delete_fluid_list_mod(synth->default_mod);
|
||||
|
||||
FLUID_FREE(synth->overflow.important_channels);
|
||||
|
||||
|
|
Loading…
Reference in a new issue