Add tests for oscillator_multi
This commit is contained in:
parent
db3521027e
commit
0dca7dbc5e
3 changed files with 43 additions and 0 deletions
|
|
@ -259,6 +259,43 @@ TEST_CASE("[Files] Channels (channels.sfz)")
|
||||||
REQUIRE(synth.getRegionView(1)->isStereo());
|
REQUIRE(synth.getRegionView(1)->isStereo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("[Files] Channels (channels_multi.sfz)")
|
||||||
|
{
|
||||||
|
sfz::Synth synth;
|
||||||
|
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/channels_multi.sfz");
|
||||||
|
REQUIRE(synth.getNumRegions() == 6);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(0)->sample == "*sine");
|
||||||
|
REQUIRE(!synth.getRegionView(0)->isStereo());
|
||||||
|
REQUIRE(synth.getRegionView(0)->isGenerator());
|
||||||
|
REQUIRE(!synth.getRegionView(0)->oscillator);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(1)->sample == "*sine");
|
||||||
|
REQUIRE(synth.getRegionView(1)->isStereo());
|
||||||
|
REQUIRE(synth.getRegionView(1)->isGenerator());
|
||||||
|
REQUIRE(!synth.getRegionView(1)->oscillator);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(2)->sample == "ramp_wave.wav");
|
||||||
|
REQUIRE(!synth.getRegionView(2)->isStereo());
|
||||||
|
REQUIRE(!synth.getRegionView(2)->isGenerator());
|
||||||
|
REQUIRE(synth.getRegionView(2)->oscillator);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(3)->sample == "ramp_wave.wav");
|
||||||
|
REQUIRE(synth.getRegionView(3)->isStereo());
|
||||||
|
REQUIRE(!synth.getRegionView(3)->isGenerator());
|
||||||
|
REQUIRE(synth.getRegionView(3)->oscillator);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(4)->sample == "*sine");
|
||||||
|
REQUIRE(!synth.getRegionView(4)->isStereo());
|
||||||
|
REQUIRE(synth.getRegionView(4)->isGenerator());
|
||||||
|
REQUIRE(!synth.getRegionView(4)->oscillator);
|
||||||
|
|
||||||
|
REQUIRE(synth.getRegionView(5)->sample == "*sine");
|
||||||
|
REQUIRE(!synth.getRegionView(5)->isStereo());
|
||||||
|
REQUIRE(synth.getRegionView(5)->isGenerator());
|
||||||
|
REQUIRE(!synth.getRegionView(5)->oscillator);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("[Files] sw_default")
|
TEST_CASE("[Files] sw_default")
|
||||||
{
|
{
|
||||||
sfz::Synth synth;
|
sfz::Synth synth;
|
||||||
|
|
|
||||||
6
tests/TestFiles/channels_multi.sfz
Normal file
6
tests/TestFiles/channels_multi.sfz
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<region> sample=*sine
|
||||||
|
<region> sample=*sine oscillator_multi=3
|
||||||
|
<region> sample=ramp_wave.wav oscillator=on
|
||||||
|
<region> sample=ramp_wave.wav oscillator=on oscillator_multi=3
|
||||||
|
<region> sample=*sine oscillator_multi=1
|
||||||
|
<region> sample=*sine oscillator_multi=2
|
||||||
BIN
tests/TestFiles/ramp_wave.wav
Normal file
BIN
tests/TestFiles/ramp_wave.wav
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue