summaryrefslogtreecommitdiffstats
path: root/src/server/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-15 07:17:10 +0000
committerDavid Robillard <d@drobilla.net>2011-09-15 07:17:10 +0000
commitc7f671ff5bf9cf2559697bbc90cf3cee97cc7975 (patch)
treec9448a87cce9bfc957d32bc3b1b404cb7f0c6984 /src/server/PortImpl.cpp
parentba99f4ca92ea2e6cf8de51341489b0689223e1fc (diff)
downloadingen-c7f671ff5bf9cf2559697bbc90cf3cee97cc7975.tar.gz
ingen-c7f671ff5bf9cf2559697bbc90cf3cee97cc7975.tar.bz2
ingen-c7f671ff5bf9cf2559697bbc90cf3cee97cc7975.zip
Fix control bindings (MIDI learn).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3464 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PortImpl.cpp')
-rw-r--r--src/server/PortImpl.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index 7d309bc3..2e1ad61e 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -56,6 +56,8 @@ PortImpl::PortImpl(BufferFactory& bufs,
, _buffer_size(buffer_size)
, _buffer_type(type)
, _value(value)
+ , _min(0.0f)
+ , _max(1.0f)
, _last_broadcasted_value(value)
, _context(Context::AUDIO)
, _buffers(new Array<BufferFactory::Ref>(static_cast<size_t>(poly)))
@@ -211,8 +213,8 @@ PortImpl::broadcast_value(Context& context, bool force)
break;
case PortType::EVENTS:
if (((EventBuffer*)buffer(0).get())->event_count() > 0) {
- const Notification note(Notification::PORT_ACTIVITY,
- context.start(), this, Atom(true));
+ const Notification note = Notification::make(
+ Notification::PORT_ACTIVITY, context.start(), this, Atom(true));
context.event_sink().write(sizeof(note), &note);
}
break;
@@ -226,8 +228,8 @@ PortImpl::broadcast_value(Context& context, bool force)
if (val.is_valid() && (force || val != _last_broadcasted_value)) {
_last_broadcasted_value = val;
- const Notification note(Notification::PORT_VALUE,
- context.start(), this, val);
+ const Notification note = Notification::make(
+ Notification::PORT_VALUE, context.start(), this, val);
context.event_sink().write(sizeof(note), &note);
}
}