Use the C++ version of the LV2 libraries
This commit is contained in:
parent
391f9e9a0b
commit
c226177453
5 changed files with 23 additions and 54 deletions
40
dynamite.cc
40
dynamite.cc
|
@ -1,42 +1,6 @@
|
|||
#include <lv2/core/lv2.h>
|
||||
#include "plugin.hh"
|
||||
|
||||
using Dynamite::Plugin;
|
||||
using Dynamite::Drive;
|
||||
|
||||
static LV2_Handle
|
||||
instantiate(const LV2_Descriptor* descriptor,
|
||||
double rate,
|
||||
const char* bundle_path,
|
||||
const LV2_Feature* const* features)
|
||||
{
|
||||
return new Plugin;
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup(LV2_Handle instance)
|
||||
{
|
||||
delete (Plugin *)instance;
|
||||
}
|
||||
|
||||
static const void*
|
||||
extension_data(const char *uri)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static const LV2_Descriptor descriptor = {
|
||||
"https://github.com/aleksrutins/dynamite",
|
||||
instantiate,
|
||||
(void (*)(LV2_Handle, uint32_t, void*)) &Plugin::connect_port,
|
||||
(void (*)(LV2_Handle)) &Plugin::activate,
|
||||
(void (*)(LV2_Handle, uint32_t)) &Plugin::run,
|
||||
(void (*)(LV2_Handle)) &Plugin::deactivate,
|
||||
cleanup,
|
||||
extension_data
|
||||
};
|
||||
|
||||
LV2_SYMBOL_EXPORT
|
||||
const LV2_Descriptor*
|
||||
lv2_descriptor(uint32_t index) {
|
||||
return index == 0 ? &descriptor : nullptr;
|
||||
}
|
||||
static int _ = Drive::register_class("https://github.com/aleksrutins/dynamite");
|
Loading…
Add table
Add a link
Reference in a new issue