comparison transform/RealTimeEffectModelTransformer.cpp @ 429:6036b38177e2

* Fix crash when running Generator
author Chris Cannam
date Wed, 18 Jun 2008 13:40:10 +0000
parents d35d4e79c95b
children b6dc6c7f402c
comparison
equal deleted inserted replaced
428:3e1d190048f4 429:6036b38177e2
194 for (long i = 0; i < blockSize; ++i) { 194 for (long i = 0; i < blockSize; ++i) {
195 inbufs[ch][i] = inbufs[0][i]; 195 inbufs[ch][i] = inbufs[0][i];
196 } 196 }
197 } 197 }
198 } else { 198 } else {
199 got = input->getData(0, channelCount - 1, 199 if (inbufs && inbufs[0]) {
200 blockFrame, blockSize, 200 got = input->getData(0, channelCount - 1,
201 inbufs); 201 blockFrame, blockSize,
202 while (got < blockSize) { 202 inbufs);
203 for (size_t ch = 0; ch < channelCount; ++ch) { 203 while (got < blockSize) {
204 inbufs[ch][got] = 0.0; 204 for (size_t ch = 0; ch < channelCount; ++ch) {
205 } 205 inbufs[ch][got] = 0.0;
206 ++got; 206 }
207 } 207 ++got;
208 }
209 }
208 for (size_t ch = channelCount; ch < m_plugin->getAudioInputCount(); ++ch) { 210 for (size_t ch = channelCount; ch < m_plugin->getAudioInputCount(); ++ch) {
209 for (long i = 0; i < blockSize; ++i) { 211 for (long i = 0; i < blockSize; ++i) {
210 inbufs[ch][i] = inbufs[ch % channelCount][i]; 212 inbufs[ch][i] = inbufs[ch % channelCount][i];
211 } 213 }
212 } 214 }