summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ControlBindings.cpp20
-rw-r--r--src/server/events/Delta.cpp7
2 files changed, 16 insertions, 11 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index b224d30a..48ab1ceb 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -16,6 +16,8 @@
#include <math.h>
+#include "ingen/shared/URIMap.hpp"
+
#include "ingen/shared/URIs.hpp"
#include "ingen/shared/World.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
@@ -68,14 +70,14 @@ ControlBindings::binding_key(const Raul::Atom& binding) const
Key key;
LV2_Atom* num = NULL;
if (binding.type() == uris.atom_Blank) {
- LV2_Atom_Object* obj = (LV2_Atom_Object*)binding.get_body();
- if (obj->body.otype == uris.midi_Bender) {
+ LV2_Atom_Object_Body* obj = (LV2_Atom_Object_Body*)binding.get_body();
+ if (obj->otype == uris.midi_Bender) {
key = Key(MIDI_BENDER);
- } else if (obj->body.otype == uris.midi_ChannelPressure) {
+ } else if (obj->otype == uris.midi_ChannelPressure) {
key = Key(MIDI_CHANNEL_PRESSURE);
- } else if (obj->body.otype == uris.midi_Controller) {
- lv2_atom_object_get(
- obj, (LV2_URID)uris.midi_controllerNumber, &num, NULL);
+ } else if (obj->otype == uris.midi_Controller) {
+ lv2_atom_object_body_get(
+ binding.size(), obj, (LV2_URID)uris.midi_controllerNumber, &num, NULL);
if (!num) {
Raul::error << "Controller binding missing number" << std::endl;
} else if (num->type != uris.atom_Int) {
@@ -83,9 +85,9 @@ ControlBindings::binding_key(const Raul::Atom& binding) const
} else {
key = Key(MIDI_CC, ((LV2_Atom_Int*)num)->body);
}
- } else if (obj->body.otype == uris.midi_NoteOn) {
- lv2_atom_object_get(
- obj, (LV2_URID)uris.midi_noteNumber, &num, NULL);
+ } else if (obj->otype == uris.midi_NoteOn) {
+ lv2_atom_object_body_get(
+ binding.size(), obj, (LV2_URID)uris.midi_noteNumber, &num, NULL);
if (!num) {
Raul::error << "Note binding missing number" << std::endl;
} else if (num->type != uris.atom_Int) {
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 891bebdc..c0750285 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -39,6 +39,9 @@
#define LOG(s) s << "[Delta] "
+// #define DUMP 1
+// #include "ingen/shared/URIMap.hpp"
+
namespace Ingen {
namespace Server {
namespace Events {
@@ -69,7 +72,7 @@ Delta::Delta(Engine& engine,
Resource::set_context(_properties, context);
}
- /*
+#ifdef DUMP
LOG(Raul::info) << "Delta " << subject << " : " << context << " {" << std::endl;
typedef Resource::Properties::const_iterator iterator;
for (iterator i = properties.begin(); i != properties.end(); ++i) {
@@ -84,7 +87,7 @@ Delta::Delta(Engine& engine,
<< " :: " << engine.world()->uri_map().unmap_uri(i->second.type()) << std::endl;
}
LOG(Raul::info) << "}" << std::endl;
- */
+#endif
}
Delta::~Delta()