Mercurial > hg > vamp-plugin-sdk
comparison host/vamp-simple-host.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 | 1982246a3902 |
comparison
equal
deleted
inserted
replaced
166:120f88880347 | 167:31eda4b11f2b |
---|---|
432 if (features[output][i].hasTimestamp) { | 432 if (features[output][i].hasTimestamp) { |
433 displayFrame = RealTime::realTime2Frame | 433 displayFrame = RealTime::realTime2Frame |
434 (features[output][i].timestamp, sr); | 434 (features[output][i].timestamp, sr); |
435 } | 435 } |
436 | 436 |
437 (out ? *out : cout) << displayFrame << ":"; | 437 (out ? *out : cout) << displayFrame; |
438 | |
439 if (features[output][i].hasDuration) { | |
440 displayFrame = RealTime::realTime2Frame | |
441 (features[output][i].duration, sr); | |
442 (out ? *out : cout) << "," << displayFrame; | |
443 } | |
444 | |
445 (out ? *out : cout) << ":"; | |
438 | 446 |
439 } else { | 447 } else { |
440 | 448 |
441 RealTime rt = RealTime::frame2RealTime(frame, sr); | 449 RealTime rt = RealTime::frame2RealTime(frame, sr); |
442 | 450 |
443 if (features[output][i].hasTimestamp) { | 451 if (features[output][i].hasTimestamp) { |
444 rt = features[output][i].timestamp; | 452 rt = features[output][i].timestamp; |
445 } | 453 } |
446 | 454 |
447 (out ? *out : cout) << rt.toString() << ":"; | 455 (out ? *out : cout) << rt.toString(); |
456 | |
457 if (features[output][i].hasDuration) { | |
458 rt = features[output][i].duration; | |
459 (out ? *out : cout) << "," << rt.toString(); | |
460 } | |
461 | |
462 (out ? *out : cout) << ":"; | |
448 } | 463 } |
449 | 464 |
450 for (unsigned int j = 0; j < features[output][i].values.size(); ++j) { | 465 for (unsigned int j = 0; j < features[output][i].values.size(); ++j) { |
451 (out ? *out : cout) << " " << features[output][i].values[j]; | 466 (out ? *out : cout) << " " << features[output][i].values[j]; |
452 } | 467 } |