From d71485534d3a683cae4993815f59ff68263a6751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Wed, 13 Jul 2016 17:26:10 +0200 Subject: Remove the run(int endpos) method from drumgizmo. Insert the code directly instead. --- src/drumgizmo.cc | 26 -------------------------- src/drumgizmo.h | 1 - 2 files changed, 27 deletions(-) (limited to 'src') diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index d6dc028..14d47a1 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -122,32 +122,6 @@ void DrumGizmo::setRandomSeed(unsigned int seed) rand.setSeed(seed); } -void DrumGizmo::run(int endpos) -{ - size_t pos = 0; - size_t nsamples = oe.getBufferSize(); - sample_t *samples = (sample_t *)malloc(nsamples * sizeof(sample_t)); - - setFrameSize(oe.getBufferSize()); - - ie.start(); - oe.start(); - - while(run(pos, samples, nsamples) == true) - { - pos += nsamples; - if((endpos != -1) && (pos >= (size_t)endpos)) - { - break; - } - } - - ie.stop(); - oe.stop(); - - free(samples); -} - bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples) { setFrameSize(nsamples); diff --git a/src/drumgizmo.h b/src/drumgizmo.h index 63c0fb6..8ad77d3 100644 --- a/src/drumgizmo.h +++ b/src/drumgizmo.h @@ -55,7 +55,6 @@ public: bool init(); - void run(int endpos); bool run(size_t pos, sample_t *samples, size_t nsamples); void stop(); -- cgit v1.2.3