summaryrefslogtreecommitdiffstats
path: root/src/engine/ConnectionImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-20 21:52:36 +0000
committerDavid Robillard <d@drobilla.net>2010-02-20 21:52:36 +0000
commit46e5de590817756b21a7a5d99bd4963df343f455 (patch)
tree7d7b3b63297b24d84e5b42cc8aeb22d4212738b5 /src/engine/ConnectionImpl.hpp
parentb96a4015ae39b5bdd9afbd82898c0168a0a8e613 (diff)
downloadingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.gz
ingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.bz2
ingen-46e5de590817756b21a7a5d99bd4963df343f455.zip
Heavy overhaul of buffer management and polyphony.
* Working polyphony when nodes are instantiated at desired polyphony level (dynamic still doesn't work) * Use shared silent buffer for disconnected audio inputs (save memory) * Eliminate redundant patch compiling on delete and disconnect-all events that have child events * Fix a ton of crash bugs and other issues I've since forgotten git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2468 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ConnectionImpl.hpp')
-rw-r--r--src/engine/ConnectionImpl.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp
index bd115293..896b055b 100644
--- a/src/engine/ConnectionImpl.hpp
+++ b/src/engine/ConnectionImpl.hpp
@@ -64,6 +64,9 @@ public:
void process(Context& context);
void queue(Context& context);
+ void allocate_buffer(BufferFactory& bufs);
+ void recycle_buffer() { _local_buffer = NULL; }
+
/** Get the buffer for a particular voice.
* A Connection is smart - it knows the destination port requesting the
* buffer, and will return accordingly (e.g. the same buffer for every
@@ -72,14 +75,14 @@ public:
inline BufferFactory::Ref buffer(uint32_t voice) const {
if (must_mix() || must_queue()) {
return _local_buffer;
- } else if ( ! _src_port->polyphonic()) {
+ } else if (_src_port->poly() == 1) {
return _src_port->buffer(0);
} else {
return _src_port->buffer(voice);
}
}
- void set_buffer_size(BufferFactory& bufs, size_t size);
+ void update_buffer_size(Context& context, BufferFactory& bufs);
void prepare_poly(BufferFactory& bufs, uint32_t poly);
void apply_poly(Raul::Maid& maid, uint32_t poly);