summaryrefslogtreecommitdiff
path: root/libs/ardour/thread_buffers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
commit15b5fce90480490455237da917167b0bcb5ce946 (patch)
tree5c1c5929a83c05db1a901e775fefe4f6cf8dc1b7 /libs/ardour/thread_buffers.cc
parent1385643131a2b2231bbbc0c584c76883fcfb580a (diff)
merge 3.0-panexp (pan experiments) branch, revisions 8534-8585 into 3.0, thus ending 3.0-panexp. THIS COMMIT WILL BREAK ALL EXISTING 3.0 SESSIONS IN SOME WAY (possibly not fatally).
git-svn-id: svn://localhost/ardour2/branches/3.0@8586 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/thread_buffers.cc')
-rw-r--r--libs/ardour/thread_buffers.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/thread_buffers.cc b/libs/ardour/thread_buffers.cc
index 2436b6d365..f30edee572 100644
--- a/libs/ardour/thread_buffers.cc
+++ b/libs/ardour/thread_buffers.cc
@@ -18,6 +18,7 @@
*/
#include <iostream>
+#include <algorithm>
#include "ardour/audioengine.h"
#include "ardour/buffer_set.h"
@@ -68,6 +69,10 @@ ThreadBuffers::ensure_buffers (ChanCount howmany)
void
ThreadBuffers::allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force)
{
+ /* we always need at least 2 pan buffers */
+
+ howmany = max (2U, howmany);
+
if (!force && howmany <= npan_buffers) {
return;
}