summaryrefslogtreecommitdiffstats
path: root/src/server/ControlBindings.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-08-20 20:59:48 +0000
committerDavid Robillard <d@drobilla.net>2011-08-20 20:59:48 +0000
commit769fd5a2c60ef39f0af68664b35c99f90b8d715b (patch)
treecfaeacafbeba957a349bc1511da86c988685f6e2 /src/server/ControlBindings.cpp
parentc2d440f132983a1068caa23e6c3832ddecbabaa9 (diff)
downloadingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.tar.gz
ingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.tar.bz2
ingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.zip
Fix crash when sending port notifications (fix #741).
Use a simpler system for port change notifications (abusing Event, which is virtual and thus can't be ringbuffered safely, was the cause of this crash). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3438 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ControlBindings.cpp')
-rw-r--r--src/server/ControlBindings.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 6c2cf09c..44a22f98 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -20,12 +20,12 @@
#include "raul/midi_events.h"
#include "shared/LV2URIMap.hpp"
#include "shared/World.hpp"
-#include "events/SendPortValue.hpp"
-#include "events/SendBinding.hpp"
+
#include "AudioBuffer.hpp"
#include "ControlBindings.hpp"
#include "Engine.hpp"
#include "EventBuffer.hpp"
+#include "Notification.hpp"
#include "PortImpl.hpp"
#include "ProcessContext.hpp"
#include "ThreadManager.hpp"
@@ -247,8 +247,9 @@ ControlBindings::set_port_value(ProcessContext& context, PortImpl* port, Type ty
reinterpret_cast<AudioBuffer*>(port->buffer(v).get())->set_value(
port_value.get_float(), context.start(), context.start());
- const Events::SendPortValue ev(context.engine(), context.start(), port, true, 0, port_value);
- context.event_sink().write(sizeof(ev), &ev);
+ const Notification note(Notification::PORT_VALUE,
+ context.start(), port, port_value);
+ context.event_sink().write(sizeof(note), &note);
}
bool
@@ -264,8 +265,9 @@ ControlBindings::bind(ProcessContext& context, Key key)
_bindings->insert(make_pair(key, _learn_port));
- const Events::SendBinding ev(context.engine(), context.start(), _learn_port, key.type, key.num);
- context.event_sink().write(sizeof(ev), &ev);
+ // FIXME
+ //const Events::SendBinding ev(context.engine(), context.start(), _learn_port, key.type, key.num);
+ //context.event_sink().write(sizeof(ev), &ev);
_learn_port = NULL;
return true;