Commit Graph

88 Commits

Author SHA1 Message Date
jjceresa 454e322ddb Make float_equal true float compare 2019-10-04 14:09:59 +02:00
jjceresa f60320a7db More comments in test_modulator_amount.c 2019-10-04 14:05:44 +02:00
jjceresa 795c0c65ee fix test_modulator_amount.c 2019-10-03 13:49:45 +02:00
jjceresa 60684cb33b add parenthesis, remove unused variables 2019-10-03 11:50:15 +02:00
jjceresa 4e0f436c9a add test for API fluid_voice_add_mod() 2019-10-01 23:56:11 +02:00
jjceresa 2afab29bab move printing functions to the proper file.
- move fluid_dump_linked_mod() to fluid_mod.c
- move fluid_print_voice_mod() to fluid_voice.c
2019-10-01 18:03:46 +02:00
jjceresa 6ce17ed648 Remove dest0_idx param in fluid_linked_branch_test_identity()
- This parameter was useful only with old recursive implementation
  of this function.
2019-10-01 16:40:38 +02:00
jjceresa a87162746e add mod_idx param to fluid_dump_linked_mod() 2019-10-01 14:25:04 +02:00
jjceresa 3d8471d06c Replace space by underscore in list name 2019-09-29 01:16:42 +02:00
jjceresa 7587ef68df Add tests in test_modulator_links.c
These test check expected internal ordering of linked
modulators returned in linked_mod list:
 - Tests 3.2, 3.2.1
 - Test  3.3, 3.3.1
2019-09-29 00:56:20 +02:00
jjceresa 03d518eeba Add mod_count parameter to fluid_list_check_linked_mod()
1)@param mod_count number of modulators in table list_mod:
  - If > 0, the function assumes that list_mod is a table and
    initializes it as a list of modulators chained by next field, so that the caller
    doesn't need to do this initialization. This is appropriate when the
    function is called from fluid_voice_add_mod2().

  - If 0, the function assumes that mod_list is a list of modulators with next
    field properly initalialized by the caller. This is appropriate when the
    function is called from the soundfont loader.

 2) Test 11 is added to test_modulator_links.c allowing to test	this new  parameter.
2019-09-17 18:35:47 +02:00
jjceresa 7510d908f3 fix comments in test 10 2019-09-17 15:20:18 +02:00
jjceresa 22f94f84d9 Add linked_count parameter to fluid_list_check_linked_mod()
1)@param linked_count, number of modulators in linked_mod:
      - If > 0, the function assumes that linked_mod contains a table provided
        by the caller. The function returns linked modulators directly in
	this table which is faster because it doesn't allocate memory.
        This is appropriate when the function is called from fluid_voice_add_mod2().
      - If 0, the function makes internal allocation and returns the list in
        linked_mod. This is appropriate when the function is called from
        the soundfont loader as the list of linked modulators must exist during the
	life of the preset it belongs to. NULL is returned in linked_mod if there is
	no linked modulators in list_mod.

   2) Test 10 is added to test_modulator_links.c allowing to test this new  parameter.
2019-09-17 04:05:47 +02:00
jjceresa 74c1699867 More comments in test_fluid_zone_check_mod.c 2019-09-15 22:28:42 +02:00
jjceresa 0dfe7c18fe remove commented line 2019-09-15 03:52:47 +02:00
jjceresa 76d5c83743 Rename function, remove duplicate functions, add comments
- rename fluid_test_linked_mod_test_identity()  to
  fluid_linked_mod_dump_test_identity()
- make use of duplicate function fluid_dump_linked_mod() in
  fluid_desfont.c
- add comments
2019-09-15 00:42:42 +02:00
jjceresa cb628568fd fix typos in comment for test 5.1 2019-09-13 17:50:41 +02:00
jjceresa c6b2547215 fix typos 2019-09-10 23:22:28 +02:00
jjceresa f23b3f9855 change value returned by fluid_list_copy_linked_mod() 2019-09-10 19:10:57 +02:00
jjceresa 635321165c change return of fluid_list_check_linked_mod()
- change return value of fluid_check_linked_mod_path()
- change return value of fluid_list_check_linked_mod()
2019-09-10 16:45:22 +02:00
derselbst dcf0d8d110 fix random unit test failure 2019-08-06 17:36:25 +02:00
derselbst b9dafa8dad Merge branch 'master' into linked-modulators 2019-08-06 17:33:44 +02:00
Tom M 5c795791c1
Suppress abort() dialog on windows (#549) 2019-08-06 17:29:49 +02:00
jjceresa c9078ba46f invalid modulators have amount forced to 0 2019-08-04 08:59:15 +02:00
jjceresa 5f4f118060 Make input list_mod left unmodified.
- fluid_list_check_linked_mod() doens't modifiy list_mod.
  This makes the function appropriate to be called by API
  fluid_voice_add_mod(),fluid_synth_add_default_mod().
2019-08-03 13:14:05 +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 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 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
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 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 dae722fecc fix modulator numbers typos error in printf 2019-07-12 20:26:05 +02:00
jjceresa aa0217826c add printf to test_modulator_links.c 2019-07-11 05:33:20 +02:00
derselbst 9fa56bf340 Merge branch 'master' into linked-modulators 2019-07-10 17:07:41 +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 6db83ee5e2 fix test_modulator_amount
by using fluid_voice_add_mod()
2019-07-10 16:11:50 +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 8b448ffd4b fix build with MSVC 2019-04-17 19:20:36 +02:00
derselbst 68db8f4a80 add a unit test for fluid_synth_process()
addresses #527
2019-04-14 17:22:39 +02:00
derselbst a36c06cff2 remove VintageDreamsWaves-v2.sf3
Converting this soundfont to other formats is forbidden. Suspend
depending unit tests.
2019-03-24 17:25:57 +01:00