Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-hostsdk/PluginInputDomainAdapter.cpp @ 419:55de53d7c777
Merge
author | Chris Cannam |
---|---|
date | Tue, 01 Mar 2016 12:21:23 +0000 |
parents | e0697515163f |
children | 35fa4733bc5d |
comparison
equal
deleted
inserted
replaced
418:a13635e9c440 | 419:55de53d7c777 |
---|---|
506 Plugin::FeatureSet | 506 Plugin::FeatureSet |
507 PluginInputDomainAdapter::Impl::processShiftingTimestamp(const float *const *inputBuffers, | 507 PluginInputDomainAdapter::Impl::processShiftingTimestamp(const float *const *inputBuffers, |
508 RealTime timestamp) | 508 RealTime timestamp) |
509 { | 509 { |
510 if (m_method == ShiftTimestamp) { | 510 if (m_method == ShiftTimestamp) { |
511 // we may need to add one nsec if timestamp + | |
512 // getTimestampAdjustment() rounds down | |
511 timestamp = timestamp + getTimestampAdjustment(); | 513 timestamp = timestamp + getTimestampAdjustment(); |
514 RealTime nsec(0, 1); | |
515 if (RealTime::realTime2Frame(timestamp, m_inputSampleRate) < | |
516 RealTime::realTime2Frame(timestamp + nsec, m_inputSampleRate)) { | |
517 timestamp = timestamp + nsec; | |
518 } | |
512 } | 519 } |
513 | 520 |
514 for (int c = 0; c < m_channels; ++c) { | 521 for (int c = 0; c < m_channels; ++c) { |
515 | 522 |
516 m_window->cut(inputBuffers[c], m_ri); | 523 m_window->cut(inputBuffers[c], m_ri); |