Updated/added tests

This commit is contained in:
Paul Ferrand 2020-09-23 13:34:01 +02:00
parent 1bb2fbdf40
commit 51459c8f2d
2 changed files with 12 additions and 1 deletions

View file

@ -1045,7 +1045,7 @@ TEST_CASE("[Region] Parsing opcodes")
REQUIRE(region.amplitudeEG.decay == 0.0f);
REQUIRE(region.amplitudeEG.delay == 0.0f);
REQUIRE(region.amplitudeEG.hold == 0.0f);
REQUIRE(region.amplitudeEG.release == 0.0f);
REQUIRE(region.amplitudeEG.release == 0.001f);
REQUIRE(region.amplitudeEG.start == 0.0f);
REQUIRE(region.amplitudeEG.sustain == 100.0f);
REQUIRE(region.amplitudeEG.depth == 0);

View file

@ -1369,3 +1369,14 @@ TEST_CASE("[Synth] Initial values of CC")
REQUIRE(synth.getHdccInit(111) == Approx(0.1234f));
REQUIRE(synth.getHdccInit(112) == Approx(77.0f / 127));
}
TEST_CASE("[Synth] Default ampeg_release")
{
sfz::Synth synth;
synth.loadSfzString(fs::current_path() / "default_release.sfz", R"(
<region> sample=*sine
)");
REQUIRE(synth.getRegionView(0)->amplitudeEG.release > 0.0005f);
}