comparison vamp-client/PiperVampPlugin.h @ 273:82a89c4345c6

Pass correct number of values for FrequencyDomain input
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 17 Oct 2018 15:22:02 +0100
parents 37760b5376b3
children 4b581a498981
comparison
equal deleted inserted replaced
272:50e3c02c11cc 273:82a89c4345c6
342 m_state = Failed; 342 m_state = Failed;
343 throw std::logic_error("Plugin has already been disposed of"); 343 throw std::logic_error("Plugin has already been disposed of");
344 } 344 }
345 345
346 std::vector<std::vector<float> > vecbuf; 346 std::vector<std::vector<float> > vecbuf;
347
348 int bufferSize;
349 if (m_psd.inputDomain == FrequencyDomain) {
350 bufferSize = 2 * (m_config.framing.blockSize / 2) + 2;
351 } else {
352 bufferSize = m_config.framing.blockSize;
353 }
354
347 for (int c = 0; c < m_config.channelCount; ++c) { 355 for (int c = 0; c < m_config.channelCount; ++c) {
348 vecbuf.push_back(std::vector<float> 356 vecbuf.push_back(std::vector<float>
349 (inputBuffers[c], 357 (inputBuffers[c], inputBuffers[c] + bufferSize));
350 inputBuffers[c] + m_config.framing.blockSize));
351 } 358 }
352 359
353 try { 360 try {
354 return m_client->process(this, vecbuf, timestamp); 361 return m_client->process(this, vecbuf, timestamp);
355 } catch (const std::exception &) { 362 } catch (const std::exception &) {