comparison src/vamp-hostsdk/PluginBufferingAdapter.cpp @ 269:91821a3ab0b6

* Fix incorrect handling of step & block size in time-domain plugin that specifies neither * Add computed_by for features to link back to their transforms
author cannam
date Tue, 25 Nov 2008 17:51:12 +0000
parents 6579e441f2fe
children e0b7a35ea18e
comparison
equal deleted inserted replaced
268:6579e441f2fe 269:91821a3ab0b6
436 436
437 // or sensible defaults if it has no preference 437 // or sensible defaults if it has no preference
438 if (m_blockSize == 0) { 438 if (m_blockSize == 0) {
439 if (m_stepSize == 0) { 439 if (m_stepSize == 0) {
440 m_blockSize = 1024; 440 m_blockSize = 1024;
441 if (freq) {
442 m_stepSize = m_blockSize / 2;
443 } else {
444 m_stepSize = m_blockSize;
445 }
441 } else if (freq) { 446 } else if (freq) {
442 m_blockSize = m_stepSize * 2; 447 m_blockSize = m_stepSize * 2;
443 } else { 448 } else {
444 m_blockSize = m_stepSize; 449 m_blockSize = m_stepSize;
445 } 450 }
473 m_buffers[i] = new float[m_blockSize]; 478 m_buffers[i] = new float[m_blockSize];
474 } 479 }
475 480
476 bool success = m_plugin->initialise(m_channels, m_stepSize, m_blockSize); 481 bool success = m_plugin->initialise(m_channels, m_stepSize, m_blockSize);
477 482
478 std::cerr << "PluginBufferingAdapter::initialise: success = " << success << std::endl; 483 // std::cerr << "PluginBufferingAdapter::initialise: success = " << success << std::endl;
479 484
480 if (success) { 485 if (success) {
481 // Re-query outputs; properties such as bin count may have 486 // Re-query outputs; properties such as bin count may have
482 // changed on initialise 487 // changed on initialise
483 m_outputs.clear(); 488 m_outputs.clear();
489 494
490 PluginBufferingAdapter::OutputList 495 PluginBufferingAdapter::OutputList
491 PluginBufferingAdapter::Impl::getOutputDescriptors() const 496 PluginBufferingAdapter::Impl::getOutputDescriptors() const
492 { 497 {
493 if (m_outputs.empty()) { 498 if (m_outputs.empty()) {
494 std::cerr << "PluginBufferingAdapter::getOutputDescriptors: querying anew" << std::endl; 499 // std::cerr << "PluginBufferingAdapter::getOutputDescriptors: querying anew" << std::endl;
495 500
496 m_outputs = m_plugin->getOutputDescriptors(); 501 m_outputs = m_plugin->getOutputDescriptors();
497 } 502 }
498 503
499 PluginBufferingAdapter::OutputList outs = m_outputs; 504 PluginBufferingAdapter::OutputList outs = m_outputs;