summaryrefslogtreecommitdiff
path: root/test/enginetest.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/enginetest.cc
parent25bf0872b6e3a28f93d222823b09e86549ea36d9 (diff)
Make all the tests use the drumkit_creator functions.
Diffstat (limited to 'test/enginetest.cc')
-rw-r--r--test/enginetest.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/enginetest.cc b/test/enginetest.cc
index 96d513f..7079bad 100644
--- a/test/enginetest.cc
+++ b/test/enginetest.cc
@@ -29,6 +29,8 @@
#include <drumgizmo.h>
#include <unistd.h>
+#include "drumkit_creator.h"
+
class AudioOutputEngineDummy
: public AudioOutputEngine
{
@@ -81,28 +83,32 @@ public:
DrumGizmo dg(settings, oe, ie);
dg.setFrameSize(100);
+ // Create drumkits
+ auto kit1_file = drumkit_creator::createStdKit("kit1");
+ auto kit2_file = drumkit_creator::createStdKit("kit2");
+
// Switch kits emmidiately without giving the loader time to work:
for(int i = 0; i < 100; ++i)
{
- settings.drumkit_file.store("kit/kit1.xml");
- settings.drumkit_file.store("kit/kit2.xml");
+ settings.drumkit_file.store(kit1_file);
+ settings.drumkit_file.store(kit2_file);
}
// Switch kits with small delay giving the loader time to work a little:
for(int i = 0; i < 100; ++i)
{
- settings.drumkit_file.store("kit/kit1.xml");
+ settings.drumkit_file.store(kit1_file);
usleep(100);
- settings.drumkit_file.store("kit/kit2.xml");
+ settings.drumkit_file.store(kit2_file);
usleep(100);
}
// Switch kits with bigger delay giving the loader time to finish
for(int i = 0; i < 100; ++i)
{
- settings.drumkit_file.store("kit/kit1.xml");
+ settings.drumkit_file.store(kit1_file);
usleep(10000);
- settings.drumkit_file.store("kit/kit2.xml");
+ settings.drumkit_file.store(kit2_file);
usleep(10000);
}
}