6
#include <kvu_numtostr.h>
7
#include "ecatestsuite.h"
11
static const string ecasound_exec ("./ecasound_test");
12
static const string input_file("foo.wav");
14
static void eci_execute_test(const string& cmd);
16
int main(int argc, char *argv[]) {
19
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -gc:1,0.5 -o null -t:5 2>/dev/null >/dev/null");
20
eci_execute_test(ecasound_exec + " -i:" + input_file + " -o:null -t:5 2>/dev/null >/dev/null");
21
eci_execute_test(ecasound_exec + " -d:255 -z:db -r -z:nointbuf -i:" + input_file + " -o:null -t:5 2>/dev/null >/dev/null");
22
eci_execute_test(ecasound_exec + " -i:" + input_file + " -o:null -t:5 2>/dev/null >/dev/null");
23
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -epp:0 -kf:1,0,100,0.2,0,1 -o null -t:5 2>/dev/null >/dev/null");
24
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:0 -kl:1,400,4000,10 -o null -t:5 2>/dev/null >/dev/null");
25
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:0 -kl2:1,400,4000,5,10 -o null -t:5 2>/dev/null >/dev/null");
26
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:0 -klg:1,400,4000,4,0,0.0,10,1.0,20,0.0,30,1.0 -o null -t:5 2>/dev/null >/dev/null");
27
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:0 -kog:1,400,4000,0.2,1,2,0,1,0.3,1,0.6,0 -o null -t:5 2>/dev/null >/dev/null");
28
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:400 -kos:1,200,2000,0.5,0 -o null -t:5 2>/dev/null >/dev/null");
29
eci_execute_test(ecasound_exec + " -a:1 -i " + input_file + " -efl:4000.00 -ea:120.00 -efb:2000.00,4000.00 -kl:1.00,200.00,8000.00,50.00 -o null -t:5 2>/dev/null >/dev/null");
30
eci_execute_test(ecasound_exec +
31
" -f:16,1,44100 -a:bus1 -i rtnull -eac:0,2 " +
32
" -f:16,1,44100 -a:bus2 -i foo.wav -erc:1,2 -eac:0,1 " +
33
" -a:bus1,bus2 -o loop,1 " +
34
" -f:16,2,44100 -a:bus3 " +
35
" -i loop,1 -f:16,1,44100 " +
38
" -t:5 2>/dev/null >/dev/null");
40
string many_chains (ecasound_exec);
41
many_chains += " -a:";
42
for(int n = 0; n < 128; n++) {
43
many_chains += kvu_numtostr(n);
44
if (n != 128) many_chains += ",";
46
many_chains += " -i:" + input_file;
47
many_chains += " -o:null -t:5 2>/dev/null >/dev/null";
48
eci_execute_test(many_chains);
53
void eci_execute_test(const string& cmd) {
56
cout << endl << "---" << endl;
57
cout << "Running test case:" << endl;
60
if (system(cmd.c_str()) != 0) {
61
ECA_TEST_FAIL(1, cmd.c_str());