mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
Add test in test_modulator_amount.c
This commit is contained in:
parent
454e322ddb
commit
c9447e74cd
1 changed files with 14 additions and 1 deletions
|
@ -118,7 +118,20 @@ int main(void)
|
|||
TEST_ASSERT(float_equal(v->gen[GEN_FILTERFC].mod, v->mod[0].link * fluid_mod_get_amount(mod0)));
|
||||
}
|
||||
|
||||
// TODO: same test using simple modulator.
|
||||
// Same test using simple modulator: CC->m0->GEN_FILTERFC
|
||||
{
|
||||
v->gen[GEN_FILTERFC].mod = 0; // reset mod input
|
||||
v->mod_count = 0; // clear voice modulator table.
|
||||
|
||||
fluid_mod_set_source1(mod0, CC, FLUID_MOD_CC | FLUID_MOD_LINEAR | FLUID_MOD_UNIPOLAR | FLUID_MOD_POSITIVE);
|
||||
|
||||
// Add one complex modulator using fluid_voice_add_mod().
|
||||
fluid_voice_add_mod(v, mod0, FLUID_VOICE_DEFAULT);
|
||||
|
||||
fluid_voice_calculate_modulator_contributions(v);
|
||||
|
||||
TEST_ASSERT(float_equal(v->gen[GEN_FILTERFC].mod, fluid_mod_get_amount(mod0)));
|
||||
}
|
||||
|
||||
delete_fluid_mod(mod0);
|
||||
delete_fluid_mod(mod1);
|
||||
|
|
Loading…
Reference in a new issue