summaryrefslogtreecommitdiffstats
path: root/src/server/Context.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-18 18:46:53 +0000
committerDavid Robillard <d@drobilla.net>2012-11-18 18:46:53 +0000
commitd358cae57b7233bf6b781686979fc4dea4d090b3 (patch)
treee60f45f73892fd62fea6caef507567c57722b5b9 /src/server/Context.cpp
parentc8745c6975c6173d08957c4a16bf8b95831ec05a (diff)
downloadingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.gz
ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.bz2
ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.zip
Fix learn for Trigger and Internal nodes.
Set value property for inputs when a notification is sent so model is consistent (and learned values are saved correctly). Don't redundantly store value atom in PortModel, just use property directly. Fix incorrect use of lv2:integer as a predicate. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4835 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/Context.cpp')
-rw-r--r--src/server/Context.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/Context.cpp b/src/server/Context.cpp
index 20d78c0e..1be69fe4 100644
--- a/src/server/Context.cpp
+++ b/src/server/Context.cpp
@@ -18,9 +18,10 @@
#include "ingen/Log.hpp"
#include "ingen/URIMap.hpp"
+#include "Broadcaster.hpp"
+#include "BufferFactory.hpp"
#include "Context.hpp"
#include "Engine.hpp"
-#include "Broadcaster.hpp"
#include "PortImpl.hpp"
namespace Ingen {
@@ -78,6 +79,7 @@ Context::notify(LV2_URID key,
void
Context::emit_notifications(FrameTime end)
{
+ const URIs& uris = _engine.buffer_factory()->uris();
const uint32_t read_space = _event_sink.read_space();
Notification note;
for (uint32_t i = 0; i < read_space; i += sizeof(note)) {
@@ -94,6 +96,10 @@ Context::emit_notifications(FrameTime end)
if (key) {
_engine.broadcaster()->set_property(
note.port->uri(), Raul::URI(key), value);
+ if (note.port->is_input() && note.key == uris.ingen_value) {
+ // FIXME: not thread safe
+ note.port->set_property(uris.ingen_value, value);
+ }
} else {
_engine.log().error("Error unmapping notification key URI\n");
}