Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-hostsdk/PluginSummarisingAdapter.cpp @ 265:03c7167e1f30
* Use _VAMP_PLUGIN_IN_HOST_NAMESPACE rather than omitting plugin namespace
completely in host context
* Doc and build warning updates
author | cannam |
---|---|
date | Thu, 20 Nov 2008 20:16:05 +0000 |
parents | 4454843ff384 |
children | 9dc3a5e17600 |
comparison
equal
deleted
inserted
replaced
264:91ac8f5e52ea | 265:03c7167e1f30 |
---|---|
520 | 520 |
521 Result result; | 521 Result result; |
522 result.time = timestamp; | 522 result.time = timestamp; |
523 result.duration = INVALID_DURATION; | 523 result.duration = INVALID_DURATION; |
524 | 524 |
525 if (f.values.size() > m_accumulators[output].bins) { | 525 if (int(f.values.size()) > m_accumulators[output].bins) { |
526 m_accumulators[output].bins = f.values.size(); | 526 m_accumulators[output].bins = f.values.size(); |
527 } | 527 } |
528 | 528 |
529 for (int i = 0; i < int(f.values.size()); ++i) { | 529 for (int i = 0; i < int(f.values.size()); ++i) { |
530 result.values.push_back(f.values[i]); | 530 result.values.push_back(f.values[i]); |
627 // This is basically nonsense if the results have no values | 627 // This is basically nonsense if the results have no values |
628 // (i.e. their times and counts are the only things of | 628 // (i.e. their times and counts are the only things of |
629 // interest)... but perhaps it's the user's problem if they | 629 // interest)... but perhaps it's the user's problem if they |
630 // ask for segmentation (or any summary at all) in that case | 630 // ask for segmentation (or any summary at all) in that case |
631 | 631 |
632 for (int n = 0; n < source.results.size(); ++n) { | 632 for (int n = 0; n < int(source.results.size()); ++n) { |
633 | 633 |
634 // This result spans source.results[n].time to | 634 // This result spans source.results[n].time to |
635 // source.results[n].time + source.results[n].duration. | 635 // source.results[n].time + source.results[n].duration. |
636 // We need to dispose it into segments appropriately | 636 // We need to dispose it into segments appropriately |
637 | 637 |
758 if (sz == 0) continue; | 758 if (sz == 0) continue; |
759 | 759 |
760 std::vector<ValueDurationFloatPair> valvec; | 760 std::vector<ValueDurationFloatPair> valvec; |
761 | 761 |
762 for (int k = 0; k < sz; ++k) { | 762 for (int k = 0; k < sz; ++k) { |
763 while (accumulator.results[k].values.size() < | 763 while (int(accumulator.results[k].values.size()) < |
764 accumulator.bins) { | 764 accumulator.bins) { |
765 accumulator.results[k].values.push_back(0.f); | 765 accumulator.results[k].values.push_back(0.f); |
766 } | 766 } |
767 } | 767 } |
768 | 768 |