summaryrefslogtreecommitdiffstats
path: root/src/server/InputPort.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
committerDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
commit81e9fb3245bd461ebfee4cfa16d1792e48533f9e (patch)
treeeb1b30d79cba70dda9d832100dd7c14b08085b03 /src/server/InputPort.cpp
parente9d9569271ee962c09ab66c6babed1ca5655a6c6 (diff)
downloadingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.gz
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.bz2
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.zip
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
Diffstat (limited to 'src/server/InputPort.cpp')
-rw-r--r--src/server/InputPort.cpp7
1 files changed, 4 insertions, 3 deletions
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), &note);
}
_broadcast = false;