comparison src/vamp-hostsdk/PluginBufferingAdapter.cpp @ 360:2741e4323d1d

Merge
author Chris Cannam
date Fri, 28 Mar 2014 13:13:08 +0000
parents bd9a63d35e71
children 656ce0eae135
comparison
equal deleted inserted replaced
359:b4e9da4c2c69 360:2741e4323d1d
615 { 615 {
616 if (feature.hasTimestamp) { 616 if (feature.hasTimestamp) {
617 double secs = feature.timestamp.sec; 617 double secs = feature.timestamp.sec;
618 secs += feature.timestamp.nsec / 1e9; 618 secs += feature.timestamp.nsec / 1e9;
619 m_fixedRateFeatureNos[outputNo] = 619 m_fixedRateFeatureNos[outputNo] =
620 int(secs * m_outputs[outputNo].sampleRate + 0.5); 620 int(secs * double(m_outputs[outputNo].sampleRate) + 0.5);
621 } 621 }
622 622
623 feature.timestamp = RealTime::fromSeconds 623 feature.timestamp = RealTime::fromSeconds
624 (m_fixedRateFeatureNos[outputNo] / m_outputs[outputNo].sampleRate); 624 (m_fixedRateFeatureNos[outputNo] / double(m_outputs[outputNo].sampleRate));
625 625
626 feature.hasTimestamp = true; 626 feature.hasTimestamp = true;
627 627
628 m_fixedRateFeatureNos[outputNo] = m_fixedRateFeatureNos[outputNo] + 1; 628 m_fixedRateFeatureNos[outputNo] = m_fixedRateFeatureNos[outputNo] + 1;
629 } 629 }