diff options
-rw-r--r-- | plugins/LV2/include/lv2plugin.h | 5 | ||||
-rw-r--r-- | plugins/LV2/include/lv2wrapper.h | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/plugins/LV2/include/lv2plugin.h b/plugins/LV2/include/lv2plugin.h index 46464a3..77b3996 100644 --- a/plugins/LV2/include/lv2plugin.h +++ b/plugins/LV2/include/lv2plugin.h @@ -12,6 +12,8 @@ public: : rate(frame_rate) {} + virtual ~LV2Plugin() {} + void connect_port(uint32_t port, void * data) { if (port < nparams) { @@ -33,6 +35,9 @@ public: return rate; } + virtual void activate() {} + virtual void deactivate() {} + const float * params[nparams]; const float * in[ninputs]; float * out[noutputs]; diff --git a/plugins/LV2/include/lv2wrapper.h b/plugins/LV2/include/lv2wrapper.h index 26531cb..e92c690 100644 --- a/plugins/LV2/include/lv2wrapper.h +++ b/plugins/LV2/include/lv2wrapper.h @@ -42,6 +42,8 @@ private: static void activate(LV2_Handle instance) { + auto accel = static_cast<Plugin *>(instance); + accel->activate(); } static void run(LV2_Handle instance, uint32_t num_samples) @@ -50,8 +52,10 @@ private: accel->run(num_samples); } - static void deactivate(LV2_Handle) + static void deactivate(LV2_Handle instance) { + auto accel = static_cast<Plugin *>(instance); + accel->deactivate(); } static void destroy(LV2_Handle instance) |