Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-hostsdk/PluginBufferingAdapter.cpp @ 268:6579e441f2fe
* Ensure that output descriptors are re-queried after a call to
initialise, setParameter or selectProgram (following "What can
depend on a parameter?" section of programmers guide)
author | cannam |
---|---|
date | Tue, 25 Nov 2008 13:16:07 +0000 |
parents | 93c81a6c917a |
children | 91821a3ab0b6 |
comparison
equal
deleted
inserted
replaced
267:93c81a6c917a | 268:6579e441f2fe |
---|---|
473 m_buffers[i] = new float[m_blockSize]; | 473 m_buffers[i] = new float[m_blockSize]; |
474 } | 474 } |
475 | 475 |
476 bool success = m_plugin->initialise(m_channels, m_stepSize, m_blockSize); | 476 bool success = m_plugin->initialise(m_channels, m_stepSize, m_blockSize); |
477 | 477 |
478 std::cerr << "PluginBufferingAdapter::initialise: success = " << success << std::endl; | |
479 | |
478 if (success) { | 480 if (success) { |
479 // Re-query outputs; properties such as bin count may have | 481 // Re-query outputs; properties such as bin count may have |
480 // changed on initialise | 482 // changed on initialise |
481 m_outputs.clear(); | 483 m_outputs.clear(); |
482 (void)getOutputDescriptors(); | 484 (void)getOutputDescriptors(); |
487 | 489 |
488 PluginBufferingAdapter::OutputList | 490 PluginBufferingAdapter::OutputList |
489 PluginBufferingAdapter::Impl::getOutputDescriptors() const | 491 PluginBufferingAdapter::Impl::getOutputDescriptors() const |
490 { | 492 { |
491 if (m_outputs.empty()) { | 493 if (m_outputs.empty()) { |
494 std::cerr << "PluginBufferingAdapter::getOutputDescriptors: querying anew" << std::endl; | |
495 | |
492 m_outputs = m_plugin->getOutputDescriptors(); | 496 m_outputs = m_plugin->getOutputDescriptors(); |
493 } | 497 } |
494 | 498 |
495 PluginBufferingAdapter::OutputList outs = m_outputs; | 499 PluginBufferingAdapter::OutputList outs = m_outputs; |
496 | 500 |