FluidSynths overflow priority calculation, that determines which voice to
kill if the current polyphony limit has been reached, treats all channels
as equal. Only percussion channels can get a user defined score added to
their priority.
In certain use-cases there can be a number of MIDI channels that are much
more important than other ones, and not just percussion channels. For
example, a channel playing a constant pad sound which would be very
noticeable if killed.
This change adds two new synth.overflow settings:
- synth.overflow.important
- synth.overflow.important-channels
They add the ability to mark MIDI channels as "important" and have
the overflow calculation add a user defined score to voices on those
channels.
The function calls fluid_synth_update_mixer, which should only be
called with the mutex held.
This also removes the need for fluid_synth_t::with_reverb to be an atomic.
fluid_synth_t::with_chorus was already protected by the mutex and doesn't
need to be an atomic either.
Removes the need to cast the callback functions when registering them.
Also makes the needed cast from (void *) to (fluid_synth_t *) explicit
in the callback handlers.
- backwards incompatible: remove "yes", "no" support for int settings via
fluid_settings_setstr
- backwards incompatible: remove silent setting creation of named setting
does not exist
- Unlock settings mutex before calling into an update callback, to
avoid possible deadlock with FluidSynth API mutex
Callback functions and user data can be set with the previously added
functions. And callbacks are only used in a single place in new_fluid_synth,
all other calls to setttings_register_* set those two params to NULL,
so lets remove them everywhere.
it provided functionality in between of fluid_synth_get_program() and fluid_synth_get_channel_preset(), which however was not visible from the user perspective