Commit Graph

2189 Commits

Author SHA1 Message Date
derselbst 743601930a Fix two uninitialized memory accesses in new_fluid_synth()
In an out of memory situation, fluid_synth_t::voice and fluid_synth_t::channel may not be fully initialized, causing a NULL dereference and heap corruption in delete_fluid_synth().
2019-08-02 15:09:29 +02:00
derselbst 5019b2a1a9 Merge branch 'master' into linked-modulators 2019-08-02 14:16:40 +02:00
derselbst d8bbd56fea Restore original libinstpatch pkgconfig module name 2019-08-02 14:06:54 +02:00
derselbst 6a6015f047 Fix build if -Denable-fpe-check=1 on windows 2019-08-02 13:53:14 +02:00
derselbst 7e2ed650ca Make travis builds verbose 2019-08-02 13:53:14 +02:00
derselbst 775beba985 Add additional windows CI builds 2019-08-02 13:53:14 +02:00
derselbst e1dc5d8f68 Correctly define DEBUG macro 2019-08-02 13:21:21 +02:00
jjceresa a56670ad33 fix comments 2019-08-02 11:22:27 +02:00
jjceresa 57a5e2e54d prepare fluid_zone_check_linked_mod
fluid_zone_check_linked_mod() is prepared to be called from API functions
fluid_voice_add_mod(), fluid_synth_add_default_mod().
The intend when calling these API is:
 1) add a complex modulator as well a simple modulator.
 2) keeping input parameter 'mod' list intact (i.e
    any modulators shouldn't removed).

The changes are:
- fluid_zone_check_linked_mod() renamed fluid_list_check_linked_mod().
- fluid_zone_copy_linked_mod() renamed fluid_list_copy_linked_mod().
- Calling fluid_list_copy_linked_mod() is integrated in
  fluid_list_check_linked_mod(). Now fluid_list_check_linked_mod()
  have the possibility:
  1) to check only the input list_mod (if linked_mod is NULL).
  2) if linked_mod is not NULL, the function clones linked modulators from
     lis_mod to linked_mod list.

-unit test test_modulator_links.c is updated with
fluid_zone_check_linked_mod() remamed to fluid_list_check_linked_mod() and
linked_mod parameter to NULL. The behaviour is the same.
2019-07-31 18:05:12 +02:00
jjceresa 50493e9efe add comments 2019-07-31 15:34:27 +02:00
jjceresa 56bc0bd44c make CI builds happy.
-remove #ifdef DEBUG,#endif around fluid_dump_modulator.
2019-07-30 18:08:29 +02:00
Tom M df0a84ec53
Add a debug CI build using MSVC
and increase verbosity of build log
2019-07-30 12:53:17 +02:00
jjceresa 7101d72d0e forget to remove comments in b2db11c 2019-07-30 12:14:46 +02:00
jjceresa fb148e6e7d add DEBUG macro for MSVC when fluidsynth compiled with enable-debug options 2019-07-29 23:35:38 +02:00
jjceresa 539d31bd4f add braces 2019-07-29 22:54:03 +02:00
jjceresa 07047039f7 Fix Travis CI build
- make use of fluid_dump_modulator() in fluid_mod.c
- make use of string literal for printf.
- allow test_fluid_zone_check_mod to be executed with no arguments.
- use of TEST_SUCCESS macro for each test.
- fix minor comments typos.
2019-07-29 17:16:00 +02:00
jjceresa d752414342 Add comments in tests tables.
Fix Travis CI complaint.
Add return code FLUID_FAILED, FLUID_OK.
2019-07-29 00:50:12 +02:00
jjceresa 817661be52 fix comments 2019-07-28 03:52:12 +02:00
jjceresa aefa4feaab add test of fluid_zone_check_mod() 2019-07-28 03:15:21 +02:00
jjceresa a20b0a8674 replace add_amount parameter by test_mode 2019-07-27 21:50:12 +02:00
jjceresa b2db11c5a2 Simplify identification of linked modulators.
- When removing modulators in list_mod list, all linked modulators
  must be removed regardless they are valid or invalid modulators.
This commit is just a simplification, fluid_zone_check_remove_mod()
behaves as before.
2019-07-27 15:33:05 +02:00
jjceresa f65dea1fe7 Move checks of modulators with source GC none.
- These checks are moved from soundfont loader to fluid_mod_check_sources().
  This ensure these checks will also done when adding modulators by
  calling the API functions fluid_voice_add_mod() or
  fluid_synth_add_default_mod().
2019-07-26 23:05:28 +02:00
jjceresa e71a3e0e9b Add comments
- add comments to describe why a circular path is detected as
  "isolated  path".
- fix ordering in 6.4 test title.
2019-07-24 18:38:41 +02:00
derselbst 9847df9f48 add even more circular complex modulator test cases 2019-07-24 16:40:55 +02:00
Carlo Bramini d6c51cd2cc Aid constant folding in fluid_rev.c (#547) 2019-07-16 17:47:25 +02:00
jjceresa 95efd7e503 Initialize linked modulator list
- initialize linked modulator list to NULL. (just in case the caller
  have not done this).
- fix comments.
2019-07-14 14:09:58 +02:00
jjceresa 1dbd7450fe fix more comments:
- in fluid_check_linked_mod_path().
- in fluid_zone_copy_linked_mod().
2019-07-14 13:50:18 +02:00
jjceresa c23c891d18 fix comments in fluid_check_linked_mod_path() 2019-07-14 12:27:35 +02:00
jjceresa fb95fce202 add test 9 to test_modulators_links.c 2019-07-14 03:46:07 +02:00
jjceresa a0929a25de remove #if #endif 2019-07-14 03:17:03 +02:00
jjceresa 956f1992e2 Add test to test_modulator_links.c:
- complete test 6.
- add circular path tests 6.0, 6.1.
- fix test 8 title.
2019-07-14 03:07:27 +02:00
jjceresa 4744e68082 remove comments 2019-07-14 02:15:33 +02:00
jjceresa 8ef7e53692 complete comments 2019-07-14 02:13:20 +02:00
jjceresa 15dfc4fdc6 change name of modulators in sources
- the variable names are using zero-based indices (eg, mod0,mod1,..)
  (instead of 1 based indices).
- this naming is coherent with indices displayed on output which are
  zero-based:
  Example of output message:
  fluidsynth: warning: invalid destination test zone with linked modulators/mod1

  This message says that mod1 (i.e modulator at index 1 in the list) is
  an invalid destination.
2019-07-13 00:23:52 +02:00
jjceresa ee12acc37e separate each test by a blank line 2019-07-12 23:51:50 +02:00
jjceresa 80bc911b05 fix missing/misplaced comments 2019-07-12 23:17:54 +02:00
jjceresa dae722fecc fix modulator numbers typos error in printf 2019-07-12 20:26:05 +02:00
jjceresa 4be60e6fc0 fix overrun of path in fluid_is_mod_in_path() 2019-07-12 20:01:53 +02:00
jjceresa 2153c6f86c add comment in new_fluid_mod() 2019-07-12 14:28:46 +02:00
jjceresa 967d8e237c fix grammar 2019-07-12 01:49:23 +02:00
jjceresa 505be55ffb remove redundant pointer initialisation 2019-07-12 01:42:51 +02:00
jjceresa b74efca283 ignore complex modulator in mode FLUID_VOICE_OVERWRITE 2019-07-12 01:30:57 +02:00
derselbst bbbb499efd Remove unused member fluid_defpreset_t::defsfont 2019-07-11 20:58:13 +02:00
derselbst 0b60f3d94a fix dereference of undefined pointer value 2019-07-11 10:46:33 +02:00
derselbst b8cc519795 Silence clang-tidy's unsafe string operations
Since we are using C89, we cannot use any of the modern strlcpy functions.
2019-07-11 10:16:22 +02:00
derselbst 36c4c32bad remove unused var 2019-07-11 10:12:42 +02:00
derselbst 0362c6c646 fix left operand of '>>' being a garbage value 2019-07-11 10:11:55 +02:00
jjceresa aa0217826c add printf to test_modulator_links.c 2019-07-11 05:33:20 +02:00
jjceresa 07a971e663 remove unwanted tabs or space 2019-07-11 03:05:51 +02:00
jjceresa 259867eac7 Clang-tidy warning 4:
- fluid_voice.c:1856:37: warning: Assigned value is garbage or undefined
        min_val *= link_min_max[j].min;
- Add a comment to explain that link_min_max[j].min is still a valid value.
- Clang-tidy complaint should be ignored here.
2019-07-11 02:17:53 +02:00