summaryrefslogtreecommitdiff
path: root/test/audiocachetest.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/audiocachetest.cc
parent25bf0872b6e3a28f93d222823b09e86549ea36d9 (diff)
Make all the tests use the drumkit_creator functions.
Diffstat (limited to 'test/audiocachetest.cc')
-rw-r--r--test/audiocachetest.cc34
1 files changed, 24 insertions, 10 deletions
diff --git a/test/audiocachetest.cc b/test/audiocachetest.cc
index f67909d..a3d62c9 100644
--- a/test/audiocachetest.cc
+++ b/test/audiocachetest.cc
@@ -30,6 +30,8 @@
#include <audiocache.h>
#include <unistd.h>
+#include "drumkit_creator.h"
+
#define FRAMESIZE 64
class AudioCacheTest
@@ -137,41 +139,53 @@ public:
void singleChannelNonThreaded()
{
printf("\nsinglechannel_nonthreaded()\n");
- const char filename[] = "kit/ride-single-channel.wav";
+
+ auto filename = drumkit_creator::createSingleChannelWav("single_channel.wav");
+
+ // Conduct test
int channel = 0;
bool threaded = false;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
}
void singleChannelThreaded()
{
printf("\nsinglechannel_threaded()\n");
- const char filename[] = "kit/ride-single-channel.wav";
+
+ auto filename = drumkit_creator::createSingleChannelWav("single_channel.wav");
+
+ // Conduct test
int channel = 0;
bool threaded = true;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
}
void multiChannelNonThreaded()
{
printf("\nmultichannel_nonthreaded()\n");
- const char filename[] = "kit/ride-multi-channel.wav";
+
+ auto filename = drumkit_creator::createMultiChannelWav("multi_channel.wav");
+
+ // Conduct test
int channel = 0;
bool threaded = false;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
++channel;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
}
void multiChannelThreaded()
{
printf("\nmultichannel_threaded()\n");
- const char filename[] = "kit/ride-multi-channel.wav";
+
+ auto filename = drumkit_creator::createMultiChannelWav("multi_channel.wav");
+
+ // Conduct test
int channel = 0;
bool threaded = true;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
++channel;
- testHelper(filename, channel, threaded, FRAMESIZE);
+ testHelper(filename.c_str(), channel, threaded, FRAMESIZE);
}
};