- fluid_mod.c:867:26: warning: The right operand of '<' is a garbage value
while(r < branch_level[is].dest0_idx)
- rename is to state_idx for clarity.
- Add a comment to explain that branch_level[state_idx].dest0_idx is still
a valid value. Clang-tidy complaint should be ignored here.
- fluid_voice.c:1634:29: warning: Dereference of undefined pointer value
voice_mod->next = NULL;
- Add a comment to explain that voice_mod is still a valid pointer.
Clang-tidy complaint should be ignored here.
- fluid_voice.c:1228:17: warning: The left operand of '>>' is a garbage
value if(!is_gen_updated(updated_gen_bit, gen)).
- Add a comment to explain that gen is always initialized. clang-tidy
complaint should be ignored here.
new_fluid_mod() creates a modulator, but leaves the `next` member
uninitialized. Passing this modulator object to fluid_voice_add_mod()
will attempt to iterate the modulators that are linked together by `next`.
By default, libinstpatch silently adds all SF2 default modulators to the
converted DLS voices. Since fluidsynth respects the modulators provided
by libinstpatch, those modulators would conflict with the default
modulator list managed by fluidsynth. This is only noticeable, if the
user used fluidsynth's API to manipulate default modulators.
When compiled with compatibility for WinXP (toolset v141_xp), read() may return 0 (EOF) rather than '\n' which led to an early exit of the shell after a single user input.
This brings in support for compressed soundfonts (sf3) for Android.
We need libsndfile.so, but it has various dependencies (libogg, libvorbis,
libflac), which are somewhat annoying to build if you do everything
by yourself.
Fortunately cerbero has recipes for libogg, libvorbis and libflac.
I added custom recipe for libsndfile in the referenced cerbero fork, and
therefore the changes could be just in cerbero world.
Vorbis compressed SF3 samples are always loaded individually and stored
in the sample cache in uncompressed form. When dynamic-sample-loading is
not active (the default), then the uncompressed samples did not get
unloaded when unloading the SF3 font.
This fix makes sure that those samples are also freed. For bulk loaded
samples, the sample->data pointer is always the same as the
font->sampledata pointer. For individually loaded samples, the sample->data
pointer always points to a different memory region. So we can use that
information to determine if and when to unload the samples one by one.
Fixes#530Fixes#528
The old buffering code assumes that synth->cur is between 0 and FLUID_BUFSIZE.
However since fluid_synth_process() can render more than one buffer at a time
this isn't always true, and the new code handles other values properly.
Closes#527