summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-11-03 18:58:11 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2014-11-03 18:58:11 +0100
commitfc26537a907497eaf60aac0235e813fe8a26b23a (patch)
tree8db8e8c27dd946f8caae9bbbe29377e1b2ae0830
parent618ccf981bf16e848912cf8c4d72f58c7134642a (diff)
Use Drumgizmo::setSamplerate to control resampler target samplerate.
-rw-r--r--lv2/output_lv2.h2
-rw-r--r--src/audiooutputengine.h2
-rw-r--r--src/drumgizmo.cc4
3 files changed, 2 insertions, 6 deletions
diff --git a/lv2/output_lv2.h b/lv2/output_lv2.h
index c23cf2f..1b4e8c9 100644
--- a/lv2/output_lv2.h
+++ b/lv2/output_lv2.h
@@ -54,8 +54,6 @@ public:
void post(size_t nsamples);
sample_t *getBuffer(int c);
-
- size_t samplerate();
// sample_t *outputPort[NUM_OUTPUTS];
OutputPort outputPorts[NUM_OUTPUTS];
diff --git a/src/audiooutputengine.h b/src/audiooutputengine.h
index eafafe9..7f15e49 100644
--- a/src/audiooutputengine.h
+++ b/src/audiooutputengine.h
@@ -33,8 +33,6 @@
#include "channel.h"
-#define UNKNOWN_SAMPLERATE 0
-
class AudioOutputEngine {
public:
virtual ~AudioOutputEngine() {}
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 60ced09..a8121a6 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -278,7 +278,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
memset(buf, 0, nsamples * sizeof(sample_t));
getSamples(c, pos, buf, nsamples);
-
+
if(!internal) oe->run(c, samples, nsamples);
}
}
@@ -296,7 +296,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
for(size_t c = 0; c < kit.channels.size(); c++) {
resampler[c].setOutputSamples(resampler_output_buffer[c], nsamples);
}
-
+
// Process channel data
size_t kitpos = pos * resampler[0].ratio();
//printf("ratio: %f\n", resampler[c].ratio());