summaryrefslogtreecommitdiff
path: root/test/lv2.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-01-15 21:22:12 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2017-01-15 21:22:12 +0100
commitb502c26edcfae7a1ed8df928eb450d67223b7b0f (patch)
treed55455013a68d72250233cc8d6294c5d6d6c81b8 /test/lv2.cc
parent25bf0872b6e3a28f93d222823b09e86549ea36d9 (diff)
Make all the tests use the drumkit_creator functions.
Diffstat (limited to 'test/lv2.cc')
-rw-r--r--test/lv2.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/test/lv2.cc b/test/lv2.cc
index 45af076..4ad6d94 100644
--- a/test/lv2.cc
+++ b/test/lv2.cc
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <arpa/inet.h>
+#include "drumkit_creator.h"
#include "lv2_test_host.h"
#define DG_URI "http://drumgizmo.org/lv2"
@@ -108,8 +109,10 @@ public:
" <value name=\"enable_resampling\">%s</value>\n"
"</config>";
- const char drumkitfile[] = "kit/kit1.xml";
- const char midimapfile[] = "kit/midimap.xml";
+ // Create drumkit
+ auto kit1_file = drumkit_creator::createStdKit("kit1");
+
+ auto midimapfile = drumkit_creator::createStdMidimap("midimap");
bool enable_velocity_modifier = true;
float velocity_modifier_falloff = 0.5;
float velocity_modifier_weight = 0.25;
@@ -119,8 +122,8 @@ public:
char config[sizeof(config_fmt) * 2];
sprintf(config, config_fmt,
- drumkitfile,
- midimapfile,
+ kit1_file.c_str(),
+ midimapfile.c_str(),
enable_velocity_modifier?"true":"false",
velocity_modifier_falloff,
velocity_modifier_weight,
@@ -173,8 +176,10 @@ public:
" <value name=\"enable_resampling\">%s</value>\n"
"</config>";
- const char drumkitfile[] = "kit/kit1.xml";
- const char midimapfile[] = "kit/midimap.xml";
+ // Create drumkit
+ auto kit1_file = drumkit_creator::createStdKit("kit1");
+
+ auto midimapfile = drumkit_creator::createStdMidimap("midimap");
bool enable_velocity_modifier = true;
float velocity_modifier_falloff = 0.5;
float velocity_modifier_weight = 0.25;
@@ -184,8 +189,8 @@ public:
char config[sizeof(config_fmt) * 2];
sprintf(config, config_fmt,
- drumkitfile,
- midimapfile,
+ kit1_file.c_str(),
+ midimapfile.c_str(),
enable_velocity_modifier?"true":"false",
velocity_modifier_falloff,
velocity_modifier_weight,
@@ -250,8 +255,10 @@ public:
" <value name=\"enable_resampling\">%s</value>\n"
"</config>";
- const char drumkitfile[] = "kit/kit1.xml";
- const char midimapfile[] = "kit/midimap.xml";
+ // Create drumkit
+ auto kit1_file = drumkit_creator::createStdKit("kit1");
+
+ auto midimapfile = drumkit_creator::createStdMidimap("midimap");
bool enable_velocity_modifier = true;
float velocity_modifier_falloff = 0.5;
float velocity_modifier_weight = 0.25;
@@ -261,8 +268,8 @@ public:
char config[sizeof(config_fmt) * 2];
sprintf(config, config_fmt,
- drumkitfile,
- midimapfile,
+ kit1_file.c_str(),
+ midimapfile.c_str(),
enable_velocity_modifier?"true":"false",
velocity_modifier_falloff,
velocity_modifier_weight,