Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/PluginHostAdapter.cpp @ 167:31eda4b11f2b
* First bit of Vamp v2 work -- add an optional duration to features in
a backward compatible way.
Warning: this code is unstable and experimental and may change
significantly in the coming weeks.
author | cannam |
---|---|
date | Thu, 17 Jul 2008 08:52:26 +0000 |
parents | 44e6b94c2696 |
children | 006a775133b1 |
comparison
equal
deleted
inserted
replaced
166:120f88880347 | 167:31eda4b11f2b |
---|---|
402 | 402 |
403 feature.hasTimestamp = list.features[j].hasTimestamp; | 403 feature.hasTimestamp = list.features[j].hasTimestamp; |
404 feature.timestamp = RealTime(list.features[j].sec, | 404 feature.timestamp = RealTime(list.features[j].sec, |
405 list.features[j].nsec); | 405 list.features[j].nsec); |
406 | 406 |
407 if (m_descriptor->vampApiVersion >= 2) { | |
408 feature.hasDuration = list.featuresV2[j].hasDuration; | |
409 feature.duration = RealTime(list.featuresV2[j].durationSec, | |
410 list.featuresV2[j].durationNsec); | |
411 } else { | |
412 feature.hasDuration = false; | |
413 } | |
414 | |
407 for (unsigned int k = 0; k < list.features[j].valueCount; ++k) { | 415 for (unsigned int k = 0; k < list.features[j].valueCount; ++k) { |
408 feature.values.push_back(list.features[j].values[k]); | 416 feature.values.push_back(list.features[j].values[k]); |
409 } | 417 } |
410 | 418 |
411 if (list.features[j].label) { | 419 if (list.features[j].label) { |