comparison transform/RealTimePluginTransform.cpp @ 74:47fd14e29813

* Fix long-standing off-by-1 bug in WaveFileModel that was getting us the wrong values for almost all audio data when merging channels (channel == -1) * Implement cut, copy and paste * Make draw mode work properly in time value layer * Minor fixes to CSV import
author Chris Cannam
date Fri, 07 Apr 2006 17:50:33 +0000
parents 7afcfe666910
children
comparison
equal deleted inserted replaced
73:e9b8b51f6326 74:47fd14e29813
134 got = input->getValues 134 got = input->getValues
135 (m_channel, blockFrame, blockFrame + blockSize, buffers[0]); 135 (m_channel, blockFrame, blockFrame + blockSize, buffers[0]);
136 while (got < blockSize) { 136 while (got < blockSize) {
137 buffers[0][got++] = 0.0; 137 buffers[0][got++] = 0.0;
138 } 138 }
139 if (m_channel == -1 && channelCount > 1) {
140 // use mean instead of sum, as plugin input
141 for (size_t i = 0; i < got; ++i) {
142 buffers[0][i] /= channelCount;
143 }
144 }
139 } else { 145 } else {
140 for (size_t ch = 0; ch < channelCount; ++ch) { 146 for (size_t ch = 0; ch < channelCount; ++ch) {
141 got = input->getValues 147 got = input->getValues
142 (ch, blockFrame, blockFrame + blockSize, buffers[ch]); 148 (ch, blockFrame, blockFrame + blockSize, buffers[ch]);
143 while (got < blockSize) { 149 while (got < blockSize) {