Added a test for set_cc, with extended CCs
This commit is contained in:
parent
4ea288a533
commit
0d0298b1be
2 changed files with 14 additions and 0 deletions
|
|
@ -352,4 +352,15 @@ TEST_CASE("[Files] Default path is ignored for generators")
|
|||
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/default_path_generator.sfz");
|
||||
REQUIRE(synth.getNumRegions() == 1);
|
||||
REQUIRE(synth.getRegionView(0)->sample == R"(*sine)");
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("[Files] Set CC applies properly to all channels")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/set_cc.sfz");
|
||||
for (int channel = 0; channel < 16; channel++) {
|
||||
REQUIRE(synth.getMidiState().getCCValue(channel, 142) == 63);
|
||||
REQUIRE(synth.getMidiState().getCCValue(channel, 61) == 122);
|
||||
}
|
||||
}
|
||||
3
tests/TestFiles/set_cc.sfz
Normal file
3
tests/TestFiles/set_cc.sfz
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<control> set_cc61=122
|
||||
<control> set_cc142=63
|
||||
<region> sample=snare.wav
|
||||
Loading…
Add table
Reference in a new issue