Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/PluginAdapter.cpp @ 16:61887dda7fe0
* Make the host capable of doing something useful!
author | cannam |
---|---|
date | Fri, 07 Apr 2006 15:32:10 +0000 |
parents | 6c5466fbea90 |
children | 1eb44d33a371 |
comparison
equal
deleted
inserted
replaced
15:6c5466fbea90 | 16:61887dda7fe0 |
---|---|
576 // std::cerr << "PluginAdapterBase::resizeFS(" << plugin << ", " << n << ")" << std::endl; | 576 // std::cerr << "PluginAdapterBase::resizeFS(" << plugin << ", " << n << ")" << std::endl; |
577 | 577 |
578 int i = m_fsizes[plugin].size(); | 578 int i = m_fsizes[plugin].size(); |
579 if (i >= n) return; | 579 if (i >= n) return; |
580 | 580 |
581 std::cerr << "resizing from " << i << std::endl; | 581 // std::cerr << "resizing from " << i << std::endl; |
582 | 582 |
583 m_fs[plugin] = (VampFeatureList *)realloc | 583 m_fs[plugin] = (VampFeatureList *)realloc |
584 (m_fs[plugin], n * sizeof(VampFeatureList)); | 584 (m_fs[plugin], n * sizeof(VampFeatureList)); |
585 | 585 |
586 while (i < n) { | 586 while (i < n) { |
593 } | 593 } |
594 | 594 |
595 void | 595 void |
596 PluginAdapterBase::resizeFL(Plugin *plugin, int n, size_t sz) | 596 PluginAdapterBase::resizeFL(Plugin *plugin, int n, size_t sz) |
597 { | 597 { |
598 std::cerr << "PluginAdapterBase::resizeFL(" << plugin << ", " << n << ", " | 598 // std::cerr << "PluginAdapterBase::resizeFL(" << plugin << ", " << n << ", " |
599 << sz << ")" << std::endl; | 599 // << sz << ")" << std::endl; |
600 | 600 |
601 size_t i = m_fsizes[plugin][n]; | 601 size_t i = m_fsizes[plugin][n]; |
602 if (i >= sz) return; | 602 if (i >= sz) return; |
603 | 603 |
604 std::cerr << "resizing from " << i << std::endl; | 604 // std::cerr << "resizing from " << i << std::endl; |
605 | 605 |
606 m_fs[plugin][n].features = (VampFeature *)realloc | 606 m_fs[plugin][n].features = (VampFeature *)realloc |
607 (m_fs[plugin][n].features, sz * sizeof(VampFeature)); | 607 (m_fs[plugin][n].features, sz * sizeof(VampFeature)); |
608 | 608 |
609 while (m_fsizes[plugin][n] < sz) { | 609 while (m_fsizes[plugin][n] < sz) { |
616 } | 616 } |
617 | 617 |
618 void | 618 void |
619 PluginAdapterBase::resizeFV(Plugin *plugin, int n, int j, size_t sz) | 619 PluginAdapterBase::resizeFV(Plugin *plugin, int n, int j, size_t sz) |
620 { | 620 { |
621 | 621 // std::cerr << "PluginAdapterBase::resizeFV(" << plugin << ", " << n << ", " |
622 std::cerr << "PluginAdapterBase::resizeFV(" << plugin << ", " << n << ", " | 622 // << j << ", " << sz << ")" << std::endl; |
623 << j << ", " << sz << ")" << std::endl; | |
624 | 623 |
625 size_t i = m_fvsizes[plugin][n][j]; | 624 size_t i = m_fvsizes[plugin][n][j]; |
626 if (i >= sz) return; | 625 if (i >= sz) return; |
627 | 626 |
628 std::cerr << "resizing from " << i << std::endl; | 627 // std::cerr << "resizing from " << i << std::endl; |
629 | 628 |
630 m_fs[plugin][n].features[j].values = (float *)realloc | 629 m_fs[plugin][n].features[j].values = (float *)realloc |
631 (m_fs[plugin][n].features[j].values, sz * sizeof(float)); | 630 (m_fs[plugin][n].features[j].values, sz * sizeof(float)); |
632 | 631 |
633 m_fvsizes[plugin][n][j] = sz; | 632 m_fvsizes[plugin][n][j] = sz; |