summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/events/SetMetadata.cpp6
-rw-r--r--src/server/ingen_lv2.cpp17
2 files changed, 14 insertions, 9 deletions
diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp
index 5849269a..15ed26cc 100644
--- a/src/server/events/SetMetadata.cpp
+++ b/src/server/events/SetMetadata.cpp
@@ -317,9 +317,9 @@ SetMetadata::execute(ProcessContext& context)
break;
case POLYPHONY:
if (_patch->internal_poly() != static_cast<uint32_t>(value.get_int32()) &&
- !_patch->apply_internal_poly(_engine.process_context(),
- *_engine.buffer_factory(),
- *_engine.maid(), value.get_int32())) {
+ !_patch->apply_internal_poly(context,
+ *_engine.buffer_factory(),
+ *_engine.maid(), value.get_int32())) {
_status = INTERNAL_ERROR;
}
break;
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index b33f412a..e9852534 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -316,7 +316,14 @@ private:
};
struct IngenPlugin {
- Ingen::Shared::Forge forge;
+ IngenPlugin()
+ : world(NULL)
+ , main(NULL)
+ , map(NULL)
+ , argc(0)
+ , argv(NULL)
+ {}
+
Ingen::Shared::World* world;
MainThread* main;
LV2_URID_Map* map;
@@ -386,10 +393,8 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
return NULL;
}
- IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin));
- plugin->main = NULL;
- plugin->map = NULL;
- LV2_URID_Unmap* unmap = NULL;
+ IngenPlugin* plugin = new IngenPlugin();
+ LV2_URID_Unmap* unmap = NULL;
for (int i = 0; features[i]; ++i) {
if (!strcmp(features[i]->URI, LV2_URID_URI "#map")) {
plugin->map = (LV2_URID_Map*)features[i]->data;
@@ -499,7 +504,7 @@ ingen_cleanup(LV2_Handle instance)
me->world->set_engine(SharedPtr<Ingen::Server::Engine>());
me->world->set_interface(SharedPtr<Ingen::Interface>());
delete me->world;
- free(instance);
+ delete me;
}
static void