diff options
author | David Robillard <d@drobilla.net> | 2011-09-15 07:17:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-15 07:17:10 +0000 |
commit | c7f671ff5bf9cf2559697bbc90cf3cee97cc7975 (patch) | |
tree | c9448a87cce9bfc957d32bc3b1b404cb7f0c6984 /src/server/PortImpl.cpp | |
parent | ba99f4ca92ea2e6cf8de51341489b0689223e1fc (diff) | |
download | ingen-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.cpp | 10 |
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), ¬e); } 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), ¬e); } } |