summaryrefslogtreecommitdiff
path: root/lv2
diff options
context:
space:
mode:
Diffstat (limited to 'lv2')
-rw-r--r--lv2/Makefile.am12
-rw-r--r--lv2/lv2.cc2
-rw-r--r--lv2/output_lv2.cc22
-rw-r--r--lv2/output_lv2.h6
4 files changed, 18 insertions, 24 deletions
diff --git a/lv2/Makefile.am b/lv2/Makefile.am
index a714dce..9939131 100644
--- a/lv2/Makefile.am
+++ b/lv2/Makefile.am
@@ -3,12 +3,6 @@ if ENABLE_LV2
include $(top_srcdir)/plugingui/Makefile.am.plugingui
include $(top_srcdir)/src/Makefile.am.drumgizmo
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/plugingui \
- -I$(top_srcdir)/include $(SNDFILE_CXXFLAGS) \
- $(PTHREAD_CFLAGS) $(EXPAT_CFLAGS) $(LV2_CFLAGS) \
- $(PLUGIN_GUI_CFLAGS) $(SSEFLAGS)\
- -DUSE_THREAD $(SAMPLERATE_CFLAGS)
-
plugindir = $(prefix)/lib/lv2/drumgizmo.lv2
plugin_LTLIBRARIES = drumgizmo.la
plugin_DATA = manifest.ttl drumgizmo.ttl
@@ -21,6 +15,12 @@ EXTRA_DIST = \
lv2_gui.h \
lv2_instance.h
+drumgizmo_la_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/plugingui \
+ -I$(top_srcdir)/include $(SNDFILE_CXXFLAGS) \
+ $(PTHREAD_CFLAGS) $(EXPAT_CFLAGS) $(LV2_CFLAGS) \
+ $(PLUGIN_GUI_CFLAGS) $(SSEFLAGS) $(ZITA_CPPFLAGS) \
+ -DUSE_THREAD $(SAMPLERATE_CFLAGS)
+
drumgizmo_la_SOURCES = \
$(DRUMGIZMO_SOURCES) \
$(PLUGIN_GUI_SOURCES) \
diff --git a/lv2/lv2.cc b/lv2/lv2.cc
index 3aeb5f0..9ec7706 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();
+ dglv2->out = new OutputLV2(sample_rate);
dglv2->buffer = NULL;
dglv2->buffer_size = 0;
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 <string.h>
-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*/
diff --git a/lv2/output_lv2.h b/lv2/output_lv2.h
index 1b4e8c9..272a78c 100644
--- a/lv2/output_lv2.h
+++ b/lv2/output_lv2.h
@@ -39,7 +39,7 @@ public:
class OutputLV2 : public AudioOutputEngine {
public:
- OutputLV2();
+ OutputLV2(double sample_rate);
~OutputLV2();
bool init(Channels channels);
@@ -54,9 +54,13 @@ public:
void post(size_t nsamples);
sample_t *getBuffer(int c);
+
+ size_t samplerate();
// sample_t *outputPort[NUM_OUTPUTS];
OutputPort outputPorts[NUM_OUTPUTS];
+
+ double sample_rate;
};
#endif/*__DRUMGIZMO_OUTPUT_LV2_H__*/