summaryrefslogtreecommitdiff
path: root/test/dgreftest/dgreftest.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-07-13 17:26:10 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-07-13 17:28:11 +0200
commitd71485534d3a683cae4993815f59ff68263a6751 (patch)
treecf1b487fc405cde4e2c1c391d6edc57fa529fea7 /test/dgreftest/dgreftest.cc
parent633bac9e82aef192a803666aaf3d3dcff920ac0c (diff)
Remove the run(int endpos) method from drumgizmo.
Insert the code directly instead.
Diffstat (limited to 'test/dgreftest/dgreftest.cc')
-rw-r--r--test/dgreftest/dgreftest.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/dgreftest/dgreftest.cc b/test/dgreftest/dgreftest.cc
index 7d9d00c..0147244 100644
--- a/test/dgreftest/dgreftest.cc
+++ b/test/dgreftest/dgreftest.cc
@@ -130,7 +130,26 @@ int main(int argc, char* argv[])
return 1;
}
- drumgizmo.run(-1);
+ // former drumgizmo run call
+ size_t pos = 0;
+ size_t nsamples = oe->getBufferSize();
+ sample_t *samples = (sample_t *)malloc(nsamples * sizeof(sample_t));
+
+ drumgizmo.setFrameSize(oe->getBufferSize());
+
+ ie.start();
+ oe->start();
+
+ while(drumgizmo.run(pos, samples, nsamples) == true)
+ {
+ pos += nsamples;
+ }
+
+ ie.stop();
+ oe->stop();
+
+ free(samples);
+ // end former drumgizmo run call
return 0;
}