comparison 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
comparison
equal deleted inserted replaced
15:c2416d130d59 16:ba31fa322f93
122 static size_t tmpbufch = 0; 122 static size_t tmpbufch = 0;
123 static size_t tmpbufsz = 0; 123 static size_t tmpbufsz = 0;
124 124
125 size_t sourceChannels = m_source->getSourceChannelCount(); 125 size_t sourceChannels = m_source->getSourceChannelCount();
126 126
127 // Because we offer pan, we always want at least 2 channels
128 if (sourceChannels < 2) sourceChannels = 2;
129
127 if (!tmpbuf || tmpbufch != sourceChannels || tmpbufsz < m_bufferSize) { 130 if (!tmpbuf || tmpbufch != sourceChannels || tmpbufsz < m_bufferSize) {
128 131
129 if (tmpbuf) { 132 if (tmpbuf) {
130 for (size_t i = 0; i < tmpbufch; ++i) { 133 for (size_t i = 0; i < tmpbufch; ++i) {
131 delete[] tmpbuf[i]; 134 delete[] tmpbuf[i];