diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-11-03 18:55:03 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-11-03 18:55:03 +0100 |
commit | 618ccf981bf16e848912cf8c4d72f58c7134642a (patch) | |
tree | 540fad9cbaa9dbf8d0f1b91adddd5300319cacd7 /lv2 | |
parent | 3176ea311ab6ad13546f8410f4f2ebc9ef229df3 (diff) |
Use Drumgizmo::setSamplerate to control resampler target samplerate.
Diffstat (limited to 'lv2')
-rw-r--r-- | lv2/lv2.cc | 2 | ||||
-rw-r--r-- | lv2/output_lv2.cc | 9 | ||||
-rw-r--r-- | lv2/output_lv2.h | 4 |
3 files changed, 3 insertions, 12 deletions
@@ -248,7 +248,7 @@ LV2_Handle instantiate(const struct _LV2_Descriptor *descriptor, dg_descriptor.get_pci = dg_get_pci; dglv2->in = new InputLV2(); - dglv2->out = new OutputLV2(sample_rate); + dglv2->out = new OutputLV2(); dglv2->buffer = NULL; dglv2->buffer_size = 0; diff --git a/lv2/output_lv2.cc b/lv2/output_lv2.cc index b4a6877..ef2500b 100644 --- a/lv2/output_lv2.cc +++ b/lv2/output_lv2.cc @@ -28,9 +28,8 @@ #include <string.h> -OutputLV2::OutputLV2(double sample_rate) +OutputLV2::OutputLV2() { - this->sample_rate = sample_rate; for(size_t i = 0; i < NUM_OUTPUTS; i++) { outputPorts[i].size = 0; outputPorts[i].samples = NULL; @@ -83,9 +82,3 @@ sample_t *OutputLV2::getBuffer(int ch) if(ch < NUM_OUTPUTS) return outputPorts[ch].samples; return NULL; } - -size_t OutputLV2::samplerate() -{ - return sample_rate; -} - diff --git a/lv2/output_lv2.h b/lv2/output_lv2.h index 272a78c..c23cf2f 100644 --- a/lv2/output_lv2.h +++ b/lv2/output_lv2.h @@ -39,7 +39,7 @@ public: class OutputLV2 : public AudioOutputEngine { public: - OutputLV2(double sample_rate); + OutputLV2(); ~OutputLV2(); bool init(Channels channels); @@ -59,8 +59,6 @@ public: // sample_t *outputPort[NUM_OUTPUTS]; OutputPort outputPorts[NUM_OUTPUTS]; - - double sample_rate; }; #endif/*__DRUMGIZMO_OUTPUT_LV2_H__*/ |