diff audioio/AudioPortAudioTarget.cpp @ 16:ba31fa322f93

* Fix a crash in PortAudio output for mono data * Don't construct a chromagram in TonalChangeDetect plugin ctor * Update layer show/hide/dormancy for multi-view-capable layers -- the dormancy concept doesn't really work with these constraints any more
author Chris Cannam
date Fri, 03 Mar 2006 17:52:21 +0000
parents df5923e33d01
children c606d3ffa397
line wrap: on
line diff
--- a/audioio/AudioPortAudioTarget.cpp	Fri Mar 03 17:23:27 2006 +0000
+++ b/audioio/AudioPortAudioTarget.cpp	Fri Mar 03 17:52:21 2006 +0000
@@ -124,6 +124,9 @@
 
     size_t sourceChannels = m_source->getSourceChannelCount();
 
+    // Because we offer pan, we always want at least 2 channels
+    if (sourceChannels < 2) sourceChannels = 2;
+
     if (!tmpbuf || tmpbufch != sourceChannels || tmpbufsz < m_bufferSize) {
 
 	if (tmpbuf) {