Commit graph

2189 commits

Author SHA1 Message Date
jjceresa
453c3820cc lang-tidy warning 3:
- 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.
2019-07-11 01:23:11 +02:00
jjceresa
b51378a5d2 Clang-tidy warning 2:
- 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.
2019-07-11 00:14:26 +02:00
jjceresa
0fe40999a7 clang-tidy warning 1
- 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.
2019-07-10 23:38:50 +02:00
jjceresa
486b74f251 fix typos in comments 2019-07-10 22:44:24 +02:00
derselbst
9fa56bf340 Merge branch 'master' into linked-modulators 2019-07-10 17:07:41 +02:00
derselbst
eb40b5a550 Compile with address sanitizer on request 2019-07-10 17:01:12 +02:00
derselbst
e5dbe76d1b Fix memory leak in test_seqbind_unregister 2019-07-10 17:01:01 +02:00
derselbst
75fa026a76 use fabs to check for float equality 2019-07-10 16:58:59 +02:00
derselbst
4bfc0d7450 fix dangling pointer in fluid_mod_t
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`.
2019-07-10 16:26:58 +02:00
derselbst
f441121c2b use unsigned integers when checking bit flags 2019-07-10 16:26:47 +02:00
derselbst
6db83ee5e2 fix test_modulator_amount
by using fluid_voice_add_mod()
2019-07-10 16:11:50 +02:00
derselbst
06d128d698 fix declaration 2019-07-10 14:16:13 +02:00
derselbst
940028a4c8 Merge branch 'master' into linked-modulators 2019-07-10 13:54:41 +02:00
derselbst
3d33a0b7f6 add a unit test for complex modulator amounts 2019-07-10 13:50:28 +02:00
derselbst
392ae1518c add a unit test for fluid_zone_check_linked_mod() 2019-07-10 13:04:19 +02:00
derselbst
344eea00de minor fixes 2019-07-10 13:01:32 +02:00
Carlo Bramini
a02f1379d8 Add support for C99 math functions, if available (#545) 2019-07-07 11:02:31 +02:00
derselbst
2be598b8e9 Amend documentation of fluid_synth_set_gen() 2019-07-02 18:38:19 +02:00
derselbst
db1740b7e9 Avoid conflicts with libinstpatch's default SF2 modulators
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.
2019-07-02 14:15:00 +02:00
Tom M
33421922f3
Set up Azure Pipelines for most Windows CI builds (#541) 2019-06-29 10:56:09 +02:00
derselbst
c093b20c31 Fix premature exit of the fluid_shell on WinXP
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.
2019-06-29 09:10:07 +02:00
Tom M
b6df34cc27
Restructure cmake build summary (#542) 2019-06-28 16:28:41 +02:00
Carlo Bramini
0b17a84ced Cleanup floating-point arithmetics (#543)
* avoid unnecessary floating-point promotion to double when compiled `WITH_FLOAT==1`
* remove redundant calculations and reorder floating-point constants to allow better constant folding
2019-06-27 17:20:13 +02:00
Tom M
ef2c256e9e
fix build with recent libinstpatch 2019-06-22 18:57:13 +02:00
Tom M
030a497aa5
fix build with glib < 2.28 (#540)
g_clear_object() was not yet available
2019-06-22 10:22:23 +02:00
Tom M
adb498f222
Add libsndfile support to Windows CI builds (#539) 2019-06-15 15:21:24 +03:00
Carlo Bramini
580a4d16e0 Make const string really const (#536) 2019-06-09 13:30:43 +03:00
Tom M
484c4680bf
fix build 2019-06-05 20:26:47 +03:00
Tom M
b0d6c01911
enable readline support if header and lib found 2019-06-05 20:04:33 +03:00
Tom M
e49b5ed201
Support Loading DLS Files (#493)
Fixes #320
2019-05-11 05:31:56 +02:00
derselbst
fad964344c make sure appveyor mingw generates fluidsynth binaries 2019-05-01 12:57:54 +02:00
derselbst
8c272360fb remove unused variable 2019-05-01 12:56:53 +02:00
Atsushi Eno
f87f35fe71 [Android] remove extra cmake args with proper use of PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR. (#534) 2019-04-22 09:30:52 +02:00
Atsushi Eno
656fe6e2d9 [Android] disable sdl2 and enable sndfile at cmake. (#533) 2019-04-21 16:44:54 +02:00
Atsushi Eno
492ab8c7f6 [Android] add libsndfile to build. (#532)
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.
2019-04-20 09:27:15 +02:00
derselbst
c9a670d26c Merge branch '2.0.x' into master 2019-04-18 20:21:01 +02:00
derselbst
7f11a9bf5c use a common function for opening regular files
Fixes #514
2019-04-18 19:43:39 +02:00
derselbst
b817232f16 update API docs for 2.0.5 2019-04-17 20:07:40 +02:00
derselbst
8b448ffd4b fix build with MSVC 2019-04-17 19:20:36 +02:00
derselbst
e31bbe3504 Merge branch '2.0.x' into master 2019-04-17 19:14:46 +02:00
Marcus Weseloh
a0e91b9878 Fix memory-leak with SF3 samples when dynamic-sample-loading is not active
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 #530
Fixes #528
2019-04-17 19:10:38 +02:00
Carlo Bramini
b041fffc44 Remove redundant fclose (#529) 2019-04-17 19:08:45 +02:00
Stefan Westerfeld
f791162569 Fix buffering bug in fluid_synth_process().
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
2019-04-14 17:25:55 +02:00
derselbst
68db8f4a80 add a unit test for fluid_synth_process()
addresses #527
2019-04-14 17:22:39 +02:00
derselbst
226b411a04 wording docs 2019-04-13 14:52:45 +02:00
derselbst
e5c29cf8b8 bump to 2.0.5 2019-04-13 14:02:01 +02:00
derselbst
a5436021a5 fix conditional jump depending on uninitialized variable 2019-04-13 10:45:05 +02:00
Tom M
c04acc653e
Use pkgconfig to find SDL2 (#524) 2019-04-06 09:10:50 +02:00
derselbst
33450117e9 another memory leak in jack midi driver 2019-04-05 20:13:17 +02:00
derselbst
faef23f094 fix various NULL derefs and mem leaks in jack driver
closes #416
2019-04-05 20:04:21 +02:00