Add the realcc test

This commit is contained in:
Jean Pierre Cimalando 2020-05-15 00:25:37 +02:00
parent 7773474b18
commit ec7b9bbb1f
2 changed files with 12 additions and 0 deletions

View file

@ -409,6 +409,15 @@ TEST_CASE("[Files] Set HDCC applies properly")
REQUIRE(midiState.getCCValue(61) == Approx(0.1234));
}
TEST_CASE("[Files] Set RealCC applies properly")
{
sfz::Synth synth;
const auto& midiState = synth.getResources().midiState;
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/set_realcc.sfz");
REQUIRE(midiState.getCCValue(142) == Approx(0.5678));
REQUIRE(midiState.getCCValue(61) == Approx(0.1234));
}
TEST_CASE("[Files] Note and octave offsets")
{
sfz::Synth synth;

View file

@ -0,0 +1,3 @@
<control> set_realcc61=0.1234
<control> set_realcc142=0.5678
<region> sample=snare.wav