mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-25 21:31:49 +00:00
Remove now obsolete preset stack code and struct members
This commit is contained in:
parent
66610abcb9
commit
1a1bf7d0ea
2 changed files with 0 additions and 31 deletions
|
@ -197,29 +197,6 @@ fluid_defsfont_t* new_fluid_defsfont(fluid_settings_t* settings)
|
|||
|
||||
fluid_settings_getint(settings, "synth.lock-memory", &defsfont->mlock);
|
||||
|
||||
/* Initialise preset cache, so we don't have to call malloc on program changes.
|
||||
Usually, we have at most one preset per channel plus one temporarily used,
|
||||
so optimise for that case. */
|
||||
fluid_settings_getint(settings, "synth.midi-channels", &defsfont->preset_stack_capacity);
|
||||
defsfont->preset_stack_capacity++;
|
||||
|
||||
defsfont->preset_stack = FLUID_ARRAY(fluid_preset_t*, defsfont->preset_stack_capacity);
|
||||
if (!defsfont->preset_stack) {
|
||||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||
FLUID_FREE(defsfont);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < defsfont->preset_stack_capacity; i++) {
|
||||
defsfont->preset_stack[i] = FLUID_NEW(fluid_preset_t);
|
||||
if (!defsfont->preset_stack[i]) {
|
||||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||
delete_fluid_defsfont(defsfont);
|
||||
return NULL;
|
||||
}
|
||||
defsfont->preset_stack_size++;
|
||||
}
|
||||
|
||||
return defsfont;
|
||||
}
|
||||
|
||||
|
@ -258,10 +235,6 @@ int delete_fluid_defsfont(fluid_defsfont_t* defsfont)
|
|||
fluid_samplecache_unload(defsfont->sampledata);
|
||||
}
|
||||
|
||||
while (defsfont->preset_stack_size > 0)
|
||||
FLUID_FREE(defsfont->preset_stack[--defsfont->preset_stack_size]);
|
||||
FLUID_FREE(defsfont->preset_stack);
|
||||
|
||||
for (list = defsfont->preset; list; list = fluid_list_next(list)) {
|
||||
preset = (fluid_preset_t *)fluid_list_get(list);
|
||||
fluid_defpreset_preset_delete(preset);
|
||||
|
|
|
@ -109,10 +109,6 @@ struct _fluid_defsfont_t
|
|||
int mlock; /* Should we try memlock (avoid swapping)? */
|
||||
|
||||
fluid_list_t *preset_iter_cur; /* the current preset in the iteration */
|
||||
|
||||
fluid_preset_t** preset_stack; /* List of presets that are available to use */
|
||||
int preset_stack_capacity; /* Length of preset_stack array */
|
||||
int preset_stack_size; /* Current number of items in the stack */
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue