diff options
author | David Robillard <d@drobilla.net> | 2009-11-22 03:06:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-11-22 03:06:25 +0000 |
commit | e479da3c26d41e977cf55b8e2355db45991be09f (patch) | |
tree | f6887a9b19eaee951dafd17fea8021556bff1169 /src/engine/ConnectionImpl.hpp | |
parent | 58807f5840592959c31b415f7e2d64967594b5ee (diff) | |
download | ingen-e479da3c26d41e977cf55b8e2355db45991be09f.tar.gz ingen-e479da3c26d41e977cf55b8e2355db45991be09f.tar.bz2 ingen-e479da3c26d41e977cf55b8e2355db45991be09f.zip |
Partial support for message/value ports and the message context.
This use case now works:
- Add an event input and the "print" plugin from imum.lv2 to ingen
- Connect the event input to the input of "print"
- Hook Ingen up to JACK and play some MIDI events
(or get events to the print plugin from anywhere else)
- The "print" plugin will print the received events to the console
in the message context (i.e. the audio thread is realtime safe)
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2281 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ConnectionImpl.hpp')
-rw-r--r-- | src/engine/ConnectionImpl.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp index 76224269..9daea1f1 100644 --- a/src/engine/ConnectionImpl.hpp +++ b/src/engine/ConnectionImpl.hpp @@ -24,6 +24,7 @@ #include "raul/Deletable.hpp" #include "interface/PortType.hpp" #include "interface/Connection.hpp" +#include "object.lv2/object.h" #include "PortImpl.hpp" #include "PortImpl.hpp" @@ -62,6 +63,7 @@ public: void pending_disconnection(bool b) { _pending_disconnection = b; } void process(Context& context); + void queue(Context& context); /** Get the buffer for a particular voice. * A Connection is smart - it knows the destination port requesting the @@ -69,7 +71,7 @@ public: * voice in a mono->poly connection). */ inline SharedPtr<Buffer> buffer(uint32_t voice) const { - if (must_mix()) { + if (must_mix() || must_queue()) { return _local_buffer; } else if ( ! _src_port->polyphonic()) { return _src_port->buffer(0); @@ -85,9 +87,14 @@ public: /** Returns true if this connection must mix down voices into a local buffer */ inline bool must_mix() const { return _src_port->poly() > _dst_port->poly(); } + /** Returns true if this connection crosses contexts and must buffer */ + inline bool must_queue() const { return _src_port->context() != _dst_port->context(); } + protected: void dump() const; + Raul::RingBuffer<LV2_Object>* _queue; + BufferFactory& _bufs; PortImpl* const _src_port; PortImpl* const _dst_port; |