summaryrefslogtreecommitdiffstats
path: root/src/server/ControlBindings.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-17 22:36:55 +0000
committerDavid Robillard <d@drobilla.net>2012-07-17 22:36:55 +0000
commit5dcac50655a6635352e4542888e091bef515f865 (patch)
tree915b19f606b4221768287f9ca5903d5f35d19317 /src/server/ControlBindings.cpp
parentc94231abbc601652e73423ec6e43a1e241024a17 (diff)
downloadingen-5dcac50655a6635352e4542888e091bef515f865.tar.gz
ingen-5dcac50655a6635352e4542888e091bef515f865.tar.bz2
ingen-5dcac50655a6635352e4542888e091bef515f865.zip
Wrap notification stuff behind simple API and hide details in Context.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4545 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ControlBindings.cpp')
-rw-r--r--src/server/ControlBindings.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 48ab1ceb..844568d8 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -281,9 +281,7 @@ ControlBindings::set_port_value(ProcessContext& context,
reinterpret_cast<AudioBuffer*>(port->buffer(v).get())->set_value(
port_value.get_float(), context.start(), context.start());
- const Notification note = Notification::make(
- Notification::PORT_VALUE, context.start(), port, port_value);
- context.event_sink().write(sizeof(note), &note);
+ context.notify(Notification::PORT_VALUE, context.start(), port, port_value);
}
bool
@@ -299,10 +297,11 @@ ControlBindings::bind(ProcessContext& context, Key key)
_bindings->insert(make_pair(key, _learn_port));
- const Notification note = Notification::make(
- Notification::PORT_BINDING, context.start(), _learn_port,
- context.engine().world()->forge().make(key.num), key.type);
- context.event_sink().write(sizeof(note), &note);
+ context.notify(Notification::PORT_BINDING,
+ context.start(),
+ _learn_port,
+ context.engine().world()->forge().make(key.num),
+ key.type);
_learn_port = NULL;
return true;