Commit graph

2143 commits

Author SHA1 Message Date
Tom M
005719628a
Invalid generators were not removed from zone list (#810)
fluid_list_remove() should receive the beginning of a list, so it can adjust the predecessor of the element to be removed. Otherwise the element would remain in the list, which in this case led to a use-after-free afterwards.
2021-03-15 20:12:51 +01:00
Tom M
8a778e0c0e
Add warning if soundfont bigger 2GB (#811)
Advice the user to use fluidsynth 2.2.0 or later when loading soundfonts > 2GB
2021-03-14 17:20:09 +01:00
derselbst
2c1561ea18 Bump to 2.1.8 2021-03-13 18:24:28 +01:00
Patryk Obara
908b98107c Rename generated table files from .c to .inc.h
These two files are not ordinary C files, and are being compiled
through #include's in other C source files, not through invoking
compiler on generated files. This might confuse both developers and
automated systems.

For longer explanation see discussion in #800.
2021-03-13 16:36:32 +01:00
derselbst
ca40101025 Increase number of LADSPA nodes
Quick solution for 2.1.8 only.
Addresses #793.
2021-03-06 09:45:32 +01:00
derselbst
8adaaa7079 Fix regression introduced in aebc4837dd
If a voice has finished, sample_count may be smaller than FLUID_BUFSIZE,
in which case audible artifacts would occur.
Addresses #786
2021-03-04 20:16:19 +01:00
derselbst
aebc4837dd Simplify control flow to allow auto-vectorization by compiler 2021-02-07 11:05:33 +01:00
derselbst
25b0503ba7 Avoid audible clicks when rapidly chaning panning 2021-02-07 11:05:33 +01:00
derselbst
e2d67ea772 Bump to 2.1.7 2021-01-29 14:37:27 +01:00
rncbc
cd28701d52 Allow the MIDI file player restart on-demand (#755)
Resets the default sample timer properly, allowing the internal
MIDI file player to restart its playlist on any other time but
the initial first.

Lets Qsynth play any MIDI files that are drag-n-dropped, anytime
after the first, following synth engine initialization.
2021-01-28 11:25:13 +01:00
derselbst
4b5afca76c Fix a double-free when issuing the info command on string setting
Fixes #756.
2021-01-28 10:34:39 +01:00
derselbst
fff51822eb Disable floating point underflow exceptions
They often occur in reverb, chorus and IIR and break our CI for no good reason.
2021-01-23 16:00:42 +01:00
Chris Xiong
8e9d361651 chorus: avoid overwriting input buffer when storing samples in the delay line.
In `fluid_rvoice_mixer.c`:`fluid_rvoice_mixer_process_fx()`:

If an audio processing callback is used, `mix_fx_to_out` would be `FALSE`. As a result, `in_ch` and `out_ch_l` points to the same buffer.

In `fluid_chorus.c`:`fluid_chorus_processreplace()`:
```C
        /* process stereo unit */
        /* store the chorus stereo unit d_out to left and right output */
        left_out[sample_index]  = d_out[0] * chorus->wet1  + d_out[1] * chorus->wet2;
        right_out[sample_index] = d_out[1] * chorus->wet1  + d_out[0] * chorus->wet2;

        /* Write the current input sample into the circular buffer */
        push_in_delay_line(chorus, in[sample_index]);
```

Here the chorus processing code writes to the left output buffer (which will overwrite the input buffer in this case) before the sample from the input buffer is stored into the delay buffer, making the chorus output all zeros. If no audio processing callback is used, `mix_fx_to_out` would be `TRUE` and `in` and `left_out` will not point to the same buffer, therefore the order doesn't matter.

Simply swapping the two steps should be a sufficient fix. This patch also apply the same change to `fluid_chorus_processmix` only for the sake of consistency (since they are almost exact copies of each other).

Resolves #751.
2021-01-23 15:49:26 +01:00
Tom M
fd9bf6a6b0
MinGW CI: Provide Release Build Binaries (#738) 2021-01-03 20:55:48 +01:00
derselbst
272b3b8717 Update API docs on fluid_synth_sfunload() 2021-01-03 18:30:16 +01:00
jjceresa
cf424de5cf delete_fluid_synth() may not unload soundfonts still used by rvoices 2021-01-03 18:30:16 +01:00
jjceresa
0d38823527 SoundFonts cannot be unloaded if polyphony is ever exceeded
If polyphony is exceeded and FluidSynth has to allocate a voice by
calling fluid_synth_free_voice_by_kill_LOCAL(), two problems occur:

 1)The value returned by fluid_synth_get_active_voice_count() never
   returns back to 0.
 2)SoundFont samples are not unref'd properly, and therefore if an attempt is
   made to unload the SoundFont, the deferred unload timer is started, and
   fluid_synth_sfunload_callback() unsuccessfully tries	to unload the SoundFont forever.

These 2 issues are fixed by this commit.
2021-01-03 18:30:16 +01:00
Tom M
5c1cfe6a5f
Regression tests for #727 (#735)
This PR adds regression tests for #727, ensuring that soundfonts are correctly unloaded via the lazy-timer-unloading mechanism.
2021-01-03 09:42:42 +01:00
Tom M
6339feb106 Update API docs on settings recycling 2021-01-03 09:41:46 +01:00
derselbst
57f40ea91c Fix heap-use-after free 2021-01-03 09:41:46 +01:00
derselbst
03cf8e28f6 Add a unit test for issue 733 2021-01-03 09:41:46 +01:00
derselbst
17dfadbd0b Fix SonarCloud Analysis on 2.1.x branch
By adding sonar-project.properties from master
2021-01-02 17:14:41 +01:00
derselbst
26710f1076 Bump to 2.1.6 2021-01-01 21:26:12 +01:00
derselbst
6b0ddee85c Update CI scripts from master 2021-01-01 21:22:27 +01:00
derselbst
6776569abe Deprecate fluid_event_any_control_change() 2020-09-11 22:22:35 +02:00
derselbst
ff7c72c80f Bump to 2.1.5 2020-09-06 11:52:39 +02:00
Tom M
aea6644324
Use a runtime check to detect version of libinstpatch (#666)
It could be that during runtime an older version of libinstpatch is used than the one fluidsynth was compiled against. In this case, libinstpatch will fail to load DLS fonts, because libinstpatch's initialization semantics don't match those compiled into fluidsynth.
2020-08-31 20:35:21 +02:00
Fabrice Fontaine
0cccf83a38 CMakeLists.txt: fix build with gcc 4.8 (#661)
-Werror=incompatible-pointer-types is unconditionally used since version
2.1.4 and 137a14e106. This will raise a
build failure when checking for threads on gcc 4.8:

/home/buildroot/autobuild/run/instance-3/output-1/host/bin/arm-none-linux-gnueabi-gcc --sysroot=/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot -DTESTKEYWORD=inline  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Wbad-function-cast -Wcast-align   -DNDEBUG -fPIE   -o CMakeFiles/cmTC_98946.dir/CheckIncludeFile.c.o   -c /home/buildroot/autobuild/run/instance-3/output-1/build/fluidsynth-2.1.4/CMakeFiles/CMakeTmp/CheckIncludeFile.c
cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types

Fixes:
 - http://autobuild.buildroot.org/results/13cbba871db56ef8657a3d13c6ac8e1b4da0d244

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-08-17 18:01:39 +02:00
jjceresa
3ee2bbed96 fix NULL permitted for out and fx pointer buffer
Closes #659
2020-08-10 20:33:42 +02:00
derselbst
2393aef3bd Fix printf format warnings 2020-07-12 12:55:32 +02:00
derselbst
d7abe8bdfd Fix a possible race condition during midi autoconnect 2020-07-09 19:30:32 +02:00
derselbst
eac0de0345 Fix a NULL deref in jack driver 2020-07-09 19:10:11 +02:00
derselbst
85f94c61c9 Fix passing arguments from incompatible pointer type 2020-07-08 19:20:13 +02:00
derselbst
137a14e106 Turn incompatible-pointer-types warning into error 2020-07-08 19:10:53 +02:00
Tom M
031b740451
Update Doxyfile 2020-07-06 18:46:57 +02:00
derselbst
459949a62b Bump to 2.1.4 2020-07-05 16:19:33 +02:00
derselbst
56f8f9be7c Update API docs 2020-07-05 16:15:11 +02:00
derselbst
c5293fc753 Fix an uninitialized memory access
that could possibly trigger an FPE trap for instruments that use the exclusive class generator
2020-06-28 14:58:02 +02:00
derselbst
4261848dd4 Fix regression introduced in a89399476e
Mentioned commit broke fluid_synth_start() when using a DLS soundfont.
2020-06-26 17:38:49 +02:00
derselbst
19a20eb852 Fix another NULL deref related to #635 2020-05-23 15:31:48 +02:00
derselbst
27ad0684c6 Add regression test for #635 2020-05-23 15:30:27 +02:00
derselbst
28cde7e867 Reactivate test_preset_sample_loading 2020-05-23 14:40:41 +02:00
derselbst
5af89f8c92 Bump to 2.1.3 2020-05-23 14:29:17 +02:00
derselbst
a865ac33d9 Remove SDL2 not inited warning for upcoming release
Addresses #649
2020-05-19 19:44:47 +02:00
derselbst
9ad2bcaa10 Quote MIDI device names
Addresses #650
2020-05-19 16:39:07 +02:00
derselbst
4f1fdc0df7 Fix unicode string comparison 2020-05-19 16:39:07 +02:00
derselbst
45efbd97c0 Revise log messages in new_fluid_winmidi_driver()
Addresses #650.
2020-05-19 16:39:07 +02:00
derselbst
69e7eca670 Fix notes not being played that start at the value of seek_ticks
Fixes #646
2020-05-17 09:56:35 +02:00
jjceresa
d63524683f
Fix ordering of operations (#647) 2020-05-09 09:31:51 +02:00
derselbst
304096add7 Update API docs about synthesis context 2020-05-02 20:12:01 +02:00