From 84906b5777d6748c09dd5ca56169aa3366d13c71 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Jan 2007 02:51:41 +0000 Subject: Initial work on dynamic (Jack) buffer resizing (still unworking). git-svn-id: http://svn.drobilla.net/lad/ingen@229 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/TypedConnection.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/libs/engine/TypedConnection.cpp') diff --git a/src/libs/engine/TypedConnection.cpp b/src/libs/engine/TypedConnection.cpp index a0cd01e6..d4391fab 100644 --- a/src/libs/engine/TypedConnection.cpp +++ b/src/libs/engine/TypedConnection.cpp @@ -61,6 +61,22 @@ template TypedConnection::~TypedConnection(); template TypedConnection::~TypedConnection(); +/** Allocate a mixdown buffer if necessary */ +template +void +TypedConnection::set_buffer_size(size_t size) +{ + if (m_must_mix) { + assert(m_local_buffer); + delete m_local_buffer; + + m_local_buffer = new Buffer(size); + } + + m_buffer_size = size; +} + + template void TypedConnection::process(SampleCount nframes, FrameTime start, FrameTime end) -- cgit v1.2.1