From f27c1e4c31f6c9645ec42713b5105ccb735d7d7d Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 4 Oct 2020 16:52:45 +0200 Subject: [PATCH] Put a high amplitude range --- src/sfizz/Defaults.h | 2 +- tests/RegionT.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sfizz/Defaults.h b/src/sfizz/Defaults.h index 540b6944..603e36b7 100644 --- a/src/sfizz/Defaults.h +++ b/src/sfizz/Defaults.h @@ -122,7 +122,7 @@ namespace Default constexpr Range volumeRange { -144.0, 48.0 }; constexpr Range volumeCCRange { -144.0, 48.0 }; constexpr float amplitude { 100.0 }; - constexpr Range amplitudeRange { 0.0, 100.0 }; + constexpr Range amplitudeRange { 0.0, 1e8 }; constexpr float pan { 0.0 }; constexpr Range panRange { -100.0, 100.0 }; constexpr Range panCCRange { -200.0, 200.0 }; diff --git a/tests/RegionT.cpp b/tests/RegionT.cpp index 77aff25a..b07f4816 100644 --- a/tests/RegionT.cpp +++ b/tests/RegionT.cpp @@ -925,7 +925,7 @@ TEST_CASE("[Region] Parsing opcodes") region.parseOpcode({ a.first, "-40" }); REQUIRE(*a.second == 0_a); region.parseOpcode({ a.first, "140" }); - REQUIRE(*a.second == 1.0_a); + REQUIRE(*a.second == 1.4_a); } } @@ -1640,7 +1640,7 @@ TEST_CASE("[Region] Parsing opcodes") region.parseOpcode({ "amplitude", "-40" }); REQUIRE(region.amplitude == 0_a); region.parseOpcode({ "amplitude", "140" }); - REQUIRE(region.amplitude == 1.0_a); + REQUIRE(region.amplitude == 1.4_a); } SECTION("amplitude_cc") @@ -1667,7 +1667,7 @@ TEST_CASE("[Region] Parsing opcodes") region.parseOpcode({ "amplitude_stepcc120", "24" }); REQUIRE(view.at(120).step == 24.0_a); region.parseOpcode({ "amplitude_stepcc120", "15482" }); - REQUIRE(view.at(120).step == 100.0_a); + REQUIRE(view.at(120).step == 15482.0_a); region.parseOpcode({ "amplitude_stepcc120", "-2" }); REQUIRE(view.at(120).step == 0.0f); }