comparison vamp-sdk/PluginAdapter.cpp @ 108:1e7ab0399852

* marginal performance improvement through use of reserve() in PluginHostAdapter::convertFeatures
author cannam
date Fri, 08 Feb 2008 10:50:31 +0000
parents 6683f99107cf
children 44e6b94c2696
comparison
equal deleted inserted replaced
107:bbe67d59b427 108:1e7ab0399852
535 free((void *)desc); 535 free((void *)desc);
536 } 536 }
537 537
538 VampFeatureList * 538 VampFeatureList *
539 PluginAdapterBase::Impl::vampProcess(VampPluginHandle handle, 539 PluginAdapterBase::Impl::vampProcess(VampPluginHandle handle,
540 const float *const *inputBuffers, 540 const float *const *inputBuffers,
541 int sec, 541 int sec,
542 int nsec) 542 int nsec)
543 { 543 {
544 #ifdef DEBUG_PLUGIN_ADAPTER 544 #ifdef DEBUG_PLUGIN_ADAPTER
545 std::cerr << "PluginAdapterBase::Impl::vampProcess(" << handle << ", " << sec << ", " << nsec << ")" << std::endl; 545 std::cerr << "PluginAdapterBase::Impl::vampProcess(" << handle << ", " << sec << ", " << nsec << ")" << std::endl;
546 #endif 546 #endif
547 547
684 return desc; 684 return desc;
685 } 685 }
686 686
687 VampFeatureList * 687 VampFeatureList *
688 PluginAdapterBase::Impl::process(Plugin *plugin, 688 PluginAdapterBase::Impl::process(Plugin *plugin,
689 const float *const *inputBuffers, 689 const float *const *inputBuffers,
690 int sec, int nsec) 690 int sec, int nsec)
691 { 691 {
692 // std::cerr << "PluginAdapterBase::Impl::process" << std::endl; 692 // std::cerr << "PluginAdapterBase::Impl::process" << std::endl;
693 RealTime rt(sec, nsec); 693 RealTime rt(sec, nsec);
694 checkOutputMap(plugin); 694 checkOutputMap(plugin);
695 return convertFeatures(plugin, plugin->process(inputBuffers, rt)); 695 return convertFeatures(plugin, plugin->process(inputBuffers, rt));