From 81e9fb3245bd461ebfee4cfa16d1792e48533f9e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Mar 2012 06:59:48 +0000 Subject: Centralise atom creation in forge object. Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/InputPort.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/InputPort.cpp') diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index ce0c6263..9ab3692e 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -57,8 +57,8 @@ InputPort::InputPort(BufferFactory& bufs, // Set default control range if (type == PortType::CONTROL || type == PortType::CV) { - set_property(uris.lv2_minimum, 0.0f); - set_property(uris.lv2_maximum, 1.0f); + set_property(uris.lv2_minimum, bufs.forge().make(0.0f)); + set_property(uris.lv2_maximum, bufs.forge().make(1.0f)); } } @@ -158,7 +158,8 @@ InputPort::remove_connection(ProcessContext& context, const OutputPort* src_port if (is_a(PortType::AUDIO)) { // Send an update peak of 0.0 to reset to silence const Notification note = Notification::make( - Notification::PORT_ACTIVITY, context.start(), this, 0.0f); + Notification::PORT_ACTIVITY, context.start(), this, + context.engine().world()->forge().make(0.0f)); context.event_sink().write(sizeof(note), ¬e); } _broadcast = false; -- cgit v1.2.1