From 5dcac50655a6635352e4542888e091bef515f865 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 17 Jul 2012 22:36:55 +0000 Subject: 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 --- src/server/PortImpl.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/server/PortImpl.cpp') diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index 2fdca1ed..d4fcb6c8 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -236,9 +236,10 @@ PortImpl::broadcast_value(Context& context, bool force) if (_buffer_type == _bufs.uris().atom_Sequence) { LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)buffer(0)->atom(); if (seq->atom.size > sizeof(LV2_Atom_Sequence_Body)) { - const Notification note = Notification::make( - Notification::PORT_ACTIVITY, context.start(), this, forge.make(true)); - context.event_sink().write(sizeof(note), ¬e); + context.notify(Notification::PORT_ACTIVITY, + context.start(), + this, + forge.make(true)); } } break; @@ -246,9 +247,7 @@ PortImpl::broadcast_value(Context& context, bool force) if (val.is_valid() && (force || val != _last_broadcasted_value)) { _last_broadcasted_value = val; - const Notification note = Notification::make( - ntype, context.start(), this, val); - context.event_sink().write(sizeof(note), ¬e); + context.notify(ntype, context.start(), this, val); } } -- cgit v1.2.1