From 623aca05bf5c5d4491a26969c29e16d8ce38b790 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Apr 2012 23:51:38 +0000 Subject: Don't send peak values if they're equal to the last sent value. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4280 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/PortImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index c4d186d7..7dcbf060 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -225,7 +225,7 @@ PortImpl::broadcast_value(Context& context, bool force) break; case PortType::AUDIO: val = forge.make(((AudioBuffer*)buffer(0).get())->peak(context)); - { + if (force || val != _last_broadcasted_value) { const Notification note = Notification::make( Notification::PORT_ACTIVITY, context.start(), this, val); context.event_sink().write(sizeof(note), ¬e); -- cgit v1.2.1