diff options
author | David Robillard <d@drobilla.net> | 2007-01-02 02:51:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-02 02:51:41 +0000 |
commit | 84906b5777d6748c09dd5ca56169aa3366d13c71 (patch) | |
tree | 69207ea182be5c44c0a5e89d3d475ab0b39e97c5 /src/libs/engine/TypedConnection.cpp | |
parent | b249234a26f3a424fcf977b1a3b8fed4d5ac7d39 (diff) | |
download | ingen-84906b5777d6748c09dd5ca56169aa3366d13c71.tar.gz ingen-84906b5777d6748c09dd5ca56169aa3366d13c71.tar.bz2 ingen-84906b5777d6748c09dd5ca56169aa3366d13c71.zip |
Initial work on dynamic (Jack) buffer resizing (still unworking).
git-svn-id: http://svn.drobilla.net/lad/ingen@229 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/TypedConnection.cpp')
-rw-r--r-- | src/libs/engine/TypedConnection.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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<Sample>::~TypedConnection(); template TypedConnection<MidiMessage>::~TypedConnection(); +/** Allocate a mixdown buffer if necessary */ +template <typename T> +void +TypedConnection<T>::set_buffer_size(size_t size) +{ + if (m_must_mix) { + assert(m_local_buffer); + delete m_local_buffer; + + m_local_buffer = new Buffer<T>(size); + } + + m_buffer_size = size; +} + + template <typename Sample> void TypedConnection<Sample>::process(SampleCount nframes, FrameTime start, FrameTime end) |