From 618ccf981bf16e848912cf8c4d72f58c7134642a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 3 Nov 2014 18:55:03 +0100 Subject: Use Drumgizmo::setSamplerate to control resampler target samplerate. --- lv2/lv2.cc | 2 +- lv2/output_lv2.cc | 9 +-------- lv2/output_lv2.h | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) (limited to 'lv2') diff --git a/lv2/lv2.cc b/lv2/lv2.cc index 9ec7706..3aeb5f0 100644 --- a/lv2/lv2.cc +++ b/lv2/lv2.cc @@ -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 -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__*/ -- cgit v1.2.3