From 5fbec7c02c6677d701675bfcfd529bb646b4bea8 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 4 Oct 2014 17:31:19 +0200 Subject: Add samplerate() method to lv2 output engine. --- lv2/output_lv2.cc | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'lv2/output_lv2.cc') diff --git a/lv2/output_lv2.cc b/lv2/output_lv2.cc index 8187a5a..b4a6877 100644 --- a/lv2/output_lv2.cc +++ b/lv2/output_lv2.cc @@ -28,8 +28,9 @@ #include -OutputLV2::OutputLV2() +OutputLV2::OutputLV2(double sample_rate) { + this->sample_rate = sample_rate; for(size_t i = 0; i < NUM_OUTPUTS; i++) { outputPorts[i].size = 0; outputPorts[i].samples = NULL; @@ -83,19 +84,8 @@ sample_t *OutputLV2::getBuffer(int ch) return NULL; } -#ifdef TEST_OUTPUT_LV2 -//Additional dependency files -//deps: -//Required cflags (autoconf vars may be used) -//cflags: -//Required link options (autoconf vars may be used) -//libs: -#include "test.h" - -TEST_BEGIN; - -// TODO: Put some testcode here (see test.h for usable macros). - -TEST_END; +size_t OutputLV2::samplerate() +{ + return sample_rate; +} -#endif/*TEST_OUTPUT_LV2*/ -- cgit v1.2.3