Commit graph

2151 commits

Author SHA1 Message Date
Tom M
9f7ea07bfc
Fix broken FreeBSD logo in README.md 2020-02-01 19:45:06 +01:00
derselbst
e4f4390521 Fix libinstpatch's import lib name 2020-02-01 19:25:11 +01:00
derselbst
93a170ca58 Minor API doc update 2020-02-01 14:37:35 +01:00
Tom M
af2342ac43
Solve the sequencer client unregistering problem (#610)
Responsibility for calling fluid_sequencer_unregister_client() in case of FLUID_SEQ_UNREGISTERING events has been moved to fluid_sequencer_send_now(). In other words, a FLUID_SEQ_UNREGISTERING event now really unregisters the client, no matter how the client's callback function looks like.

Avoids leaking the sequencer clients if implementations do not unregister them explicitly.

Also fixes another memory leak if fluid_sequencer_register_fluidsynth() clients were unregistered with fluid_sequencer_unregister_client() rather than by sending an unregistering event.
2020-02-01 14:32:35 +01:00
Tom M
943ed37e54
Add ubsan and asan to TravisCI (#612)
Also add clang9
2020-02-01 10:55:50 +01:00
Nikos Chantziaras
545959ca17
Fix linking against libinstpatch (#617)
This fixes the case where linking fails if libinstpatch is not installed in a system/default location but instead needs to be found through `PKG_CONFIG_PATH`.
2020-02-01 08:54:21 +01:00
Atsushi Eno
69ba49348a
CMakeLists.txt: make positional code (-fPIC) customizible. (#616)
For some use cases it is necessary to specify -fPIC even if we build
static library e.g. building vst plugins (*.so) which may not load
shared libraries from outside the system paths (depends on DAWs).
For such environment we would like to build the final shared library
without depending on `libfluidsynth.so(.*)` but if we build libfluidsynth.a
it always comes without -fPIC. This change makes it adjustable.
2020-01-31 15:45:18 +01:00
derselbst
dcc9c27acf Hardening fluid_sample_validate() against invalid flag combinations
e.g. unknown compression types, multiple exclusive flags or no flags at all
2020-01-24 15:57:08 +01:00
derselbst
76f4bc3db3 Add a unit test for fluid_sample_validate() 2020-01-24 15:57:08 +01:00
derselbst
a250ac2a97 Slightly extend test_sfont_loading.c 2020-01-24 13:33:41 +01:00
Tom M
872c6bc678
Compile suitable demo files from doc/ (#611) 2020-01-24 08:57:20 +01:00
derselbst
5070fe8419 Attempt to fix double free in jack driver 2020-01-23 14:43:42 +01:00
derselbst
5b3ec92cec Fix a memory leak in the file renderer 2020-01-19 16:17:00 +01:00
Tom M
c85ad53d60
Deprecate usage of the system timer for the sequencer (#599)
Deprecate usage of the system timer for the sequencer and print a warning if the system timer is used.
2020-01-19 15:37:42 +01:00
Tom M
3610372ae5
Workaround for jack sample rate mismatch (#607)
During the creation of a jack audio driver, it is checked whether the sample-rate of the settings object matches jack's rate. If not, it was adjusted previously via fluid_synth_set_sample_rate(). Due to the deprecation of that function and removal of real-time capability of the synth.sample-rate setting, a regression was introduced in 5fbddcecc3 causing the synth's sample-rate to be not updated.

This workaround obtains the synth via the settings instance and for now calls the deprecated sample-rate set function.
2020-01-19 15:36:15 +01:00
derselbst
ba71d6ad9e Update unregistering unit test 2020-01-18 09:51:19 +01:00
derselbst
e19652d45a Amend documentation about synth.sample-rate setting 2020-01-11 14:45:20 +01:00
derselbst
6163577a61 Remove unused clang-format cmake target 2020-01-11 09:45:05 +01:00
derselbst
850e8a2ec8 Fix building without pkg-config 2020-01-11 09:43:46 +01:00
Tom M
528e5465f1
Merge pull request #606 from ffontaine/master
CMakeLists.txt: use pkg-config to find readline
2020-01-11 09:38:06 +01:00
derselbst
7f816029ab Fix a few integer truncation warnings 2020-01-10 17:07:58 +01:00
derselbst
7af62902b6 Update API doc of fluid_sample_type 2020-01-10 16:57:23 +01:00
Fabrice Fontaine
c538c9fa7e CMakeLists.txt: use pkg-config to find readline
Use pkg_check_modules to find readline dependencies such as ncurses and
fallback on current mechanism.

This will fix the following build failure when building statically:

/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libreadline.a(display.o): in function `cr':
display.c:(.text+0x1a0): undefined reference to `tputs'

Fixes:
 - http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-01-10 08:57:57 +01:00
Tom M
9b069faf87
Merge pull request #598 from FluidSynth/seq-test
Add unit tests for the sequencer
2020-01-03 21:05:07 +01:00
derselbst
f979c58e3c Add a unit test for fluid_sequencer_set_time_scale() 2020-01-03 20:30:09 +01:00
derselbst
6b42f27724 Remove redundant call to fluid_event_set_time()
It's already done by fluid_sequencer_send_at()
2020-01-02 11:14:25 +01:00
derselbst
68371d382b Update API doc of fluid_sequencer_add_midi_event_to_buffer() 2020-01-02 11:14:04 +01:00
derselbst
7898c4f4ab Add a unit test for fluid_sequencer_send_at() 2019-12-27 10:49:25 +01:00
luz.paz
45f8e0a868 Fix various typos
Found via `codespell -q 3 -L uint -S ./ChangeLog -L dur`
2019-12-17 20:11:49 +01:00
derselbst
13c6e98936 Guard the sequencer API 2019-12-14 18:38:27 +01:00
Tom M
cd199cfdc8
Remove unused tracing code from sequencer (#596) 2019-12-14 18:09:29 +01:00
derselbst
4af42bd8ea Update API docs about queuing seq events 2019-12-13 16:02:25 +01:00
derselbst
9a168ce3b2 Remove FreeBSD10.4 from CI
Image is not available anymore
2019-12-12 12:04:35 +01:00
derselbst
08848864d2 Elaborate API docs
fluid_synth_all_sounds_off() and fluid_synth_all_notes_off()
2019-12-06 17:24:58 +01:00
derselbst
b266cf21a3 Fix copy artifacts on WinXP 2019-12-01 10:35:33 +01:00
derselbst
37c9ae2bf4 Bump to 2.1.0 stable 2019-11-30 15:42:25 +01:00
derselbst
b4bef26482 Apply compilation flags to AppleClang 2019-11-13 22:15:01 +02:00
Foster McLane
19eacc6b60 Fix undefined behaviour in get_num_outputs in CoreAudio driver (#594)
See discussion in #591 for details. Basically an incorrect size was
being allocated for the CoreAudio buffer list for a device. It was being
allocated by a VLA (which already did not quite fit the semantics of the
list) and the length calculated could be 0 (instead of the size of the
struct with no buffers elements) causing undefined behaviour.

This corrects it to allocate the amount of memory required by the
CoreAudio framework function and adds a check for the size retrieval and
for the dynamic allocation. This change passed UBSan in my test where
before the change it did not.

Fixes #591
2019-11-13 22:13:54 +02:00
jjceresa
bebb5571ae Make Fine Tune destination of default modulator Pitch-Wheel-To-pitch (#590) 2019-11-08 21:26:07 +01:00
Tom M
99268a3e99
FIXME: ensure that the decompressed OGG sample is 16-bit mono (#589) 2019-11-08 16:13:28 +01:00
Tom M
56e0cfd7c1
Merge pull request #586 from FluidSynth/typecheck-fluid-log
Improve type-checking of fluid_log() format specifiers
2019-11-04 16:44:51 +01:00
Tom M
4c980c5860
Remove unused macros from config.h (#588) 2019-11-04 16:44:32 +01:00
derselbst
77ad8c1c87 Replace LASH_ENABLED by HAVE_LASH
As recommended in #587
2019-11-03 12:34:50 +01:00
Carlo Bramini
47e6cdaf50 Remove redundant check on HAVE_LASH (#587) 2019-11-03 12:32:49 +01:00
derselbst
5fbddcecc3 Remove real-time capability from synth.sample-rate setting
Addresses #585
2019-11-03 11:11:02 +01:00
derselbst
60bcdd4457 Add deprecation attribute to fluid_synth_set_sample_rate() 2019-11-03 10:55:29 +01:00
derselbst
0541864628 Fix incorrect printf format specifiers 2019-11-03 09:30:26 +01:00
derselbst
405d4bc48b Move global variable delay_length to inner scope 2019-11-03 09:20:41 +01:00
derselbst
a7162f1ef1 Fix -Wsign-compare in fluid_chorus.c 2019-11-03 08:43:46 +01:00
derselbst
accae4ef82 Add missing header guards 2019-11-03 08:41:20 +01:00