summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 4bd6a77..5d67c86 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -284,13 +284,13 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
void DrumGizmo::run(int endpos)
{
+ size_t pos = 0;
+ size_t nsamples = oe->getBufferSize();
+ sample_t *samples = (sample_t *)malloc(nsamples * sizeof(sample_t));
+
ie->start();
oe->start();
- size_t pos = 0;
- size_t nsamples = 128;//1024;
- sample_t samples[nsamples];
-
while(run(pos, samples, nsamples) == true) {
pos += nsamples;
if(endpos != -1 && pos >= (size_t)endpos) break;
@@ -298,6 +298,8 @@ void DrumGizmo::run(int endpos)
ie->stop();
oe->stop();
+
+ free(samples);
}
#ifdef SSE