summaryrefslogtreecommitdiff
path: root/drumgizmo/drumgizmoc.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 18:17:01 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 18:17:01 +0100
commit180eacc2af8a69b8ee947750ae7708b78c499f7d (patch)
tree915875240faf34c2c0bedeef1d8e25df213a1b19 /drumgizmo/drumgizmoc.cc
parent6e2fb62b35b5545c866dc1acf00857e1d160ff5e (diff)
Revert files that shouldn't have been changed in this branch...
Diffstat (limited to 'drumgizmo/drumgizmoc.cc')
-rw-r--r--drumgizmo/drumgizmoc.cc25
1 files changed, 3 insertions, 22 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc
index 8983aa3..1ccc151 100644
--- a/drumgizmo/drumgizmoc.cc
+++ b/drumgizmo/drumgizmoc.cc
@@ -147,7 +147,7 @@ int CliMain::run(int argc, char *argv[])
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
-
+
c = getopt_long(argc, argv, "hvpo:O:i:I:e:a"
#ifndef DISABLE_HUGIN
"D:"
@@ -228,7 +228,7 @@ int CliMain::run(int argc, char *argv[])
return 1;
}
- AudioInputEngineDL *ie = new AudioInputEngineDL(inputengine);
+ AudioInputEngine *ie = new AudioInputEngineDL(inputengine);
if(ie == NULL) {
printf("Invalid input engine: %s\n", inputengine.c_str());
@@ -327,10 +327,6 @@ int CliMain::run(int argc, char *argv[])
printf("Using kitfile: %s\n", kitfile.c_str());
DrumGizmo gizmo(oe, ie);
- oe->setEngine(&gizmo);
- ie->setEngine(&gizmo);
-
- gizmo.setFrameSize(oe->getBufferSize());
if(kitfile == "" || !gizmo.loadkit(kitfile)) {
printf("Failed to load \"%s\".\n", kitfile.c_str());
@@ -361,22 +357,7 @@ int CliMain::run(int argc, char *argv[])
return 1;
}
- size_t pos = 0;
- size_t nsamples = oe->getBufferSize();
- sample_t *samples = (sample_t *)malloc(nsamples * sizeof(sample_t));
-
- ie->start();
- oe->start();
-
- while(gizmo.run(pos, samples, nsamples) == true) {
- pos += nsamples;
- if(endpos != -1 && pos >= (size_t)endpos) break;
- }
-
- ie->stop();
- oe->stop();
-
- free(samples);
+ gizmo.run(endpos);
printf("Quit.\n"); fflush(stdout);