summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ControlBindings.cpp1
-rw-r--r--src/server/Engine.cpp8
-rw-r--r--src/server/ingen_lv2.cpp23
3 files changed, 18 insertions, 14 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 6ffb5c7d..973874ae 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -339,6 +339,7 @@ ControlBindings::bind(ProcessContext& context, Key key)
_bindings->insert(make_pair(key, _learn_port));
uint8_t buf[128];
+ memset(buf, 0, sizeof(buf));
lv2_atom_forge_set_buffer(&_forge, buf, sizeof(buf));
forge_binding(uris, &_forge, key.type, key.num);
const LV2_Atom* atom = (const LV2_Atom*)buf;
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 71573ecb..76755a2c 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -339,11 +339,11 @@ Engine::run(uint32_t sample_count)
// Run root graph
if (_root_graph) {
_root_graph->process(_process_context);
- }
- // Emit control binding feedback
- control_bindings()->post_process(
- _process_context, _root_graph->port_impl(1)->buffer(0).get());
+ // Emit control binding feedback
+ control_bindings()->post_process(
+ _process_context, _root_graph->port_impl(1)->buffer(0).get());
+ }
return n_processed_events;
}
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index e73cc4ee..70642298 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -28,6 +28,7 @@
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
#include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h"
#include "lv2/lv2plug.in/ns/ext/log/log.h"
+#include "lv2/lv2plug.in/ns/ext/log/logger.h"
#include "lv2/lv2plug.in/ns/ext/options/options.h"
#include "lv2/lv2plug.in/ns/ext/state/state.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
@@ -501,6 +502,17 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
}
}
+ LV2_Log_Logger logger;
+ lv2_log_logger_init(&logger, map, log);
+
+ if (!map) {
+ lv2_log_error(&logger, "host did not provide URI map feature\n");
+ return NULL;
+ } else if (!unmap) {
+ lv2_log_error(&logger, "host did not provide URI unmap feature\n");
+ return NULL;
+ }
+
if (!Glib::thread_supported()) {
Glib::thread_init();
}
@@ -518,16 +530,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
}
if (!graph) {
- const std::string msg((fmt("Could not find graph %1%\n")
- % descriptor->URI).str());
- if (log) {
- log->printf(log->handle,
- map->map(map->handle, LV2_LOG__Error),
- msg.c_str(),
- NULL);
- } else {
- std::cerr << msg.c_str() << std::endl;
- }
+ lv2_log_error(&logger, "could not find graph <%s>\n", descriptor->URI);
return NULL;
}