summaryrefslogtreecommitdiffstats
path: root/src/engine/ConnectionImpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/ConnectionImpl.hpp')
-rw-r--r--src/engine/ConnectionImpl.hpp9
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;