# HG changeset patch # User Chris Cannam # Date 1364478038 0 # Node ID bd9a63d35e71aea8afc977b2892a3601c37d357c # Parent 60ede78a20dbf6518d6aa4055abf1b85c86e1ec0 Use double arithmetic for rate calculations diff -r 60ede78a20db -r bd9a63d35e71 src/vamp-hostsdk/PluginBufferingAdapter.cpp --- a/src/vamp-hostsdk/PluginBufferingAdapter.cpp Thu Mar 28 09:41:47 2013 +0000 +++ b/src/vamp-hostsdk/PluginBufferingAdapter.cpp Thu Mar 28 13:40:38 2013 +0000 @@ -617,11 +617,11 @@ double secs = feature.timestamp.sec; secs += feature.timestamp.nsec / 1e9; m_fixedRateFeatureNos[outputNo] = - int(secs * m_outputs[outputNo].sampleRate + 0.5); + int(secs * double(m_outputs[outputNo].sampleRate) + 0.5); } feature.timestamp = RealTime::fromSeconds - (m_fixedRateFeatureNos[outputNo] / m_outputs[outputNo].sampleRate); + (m_fixedRateFeatureNos[outputNo] / double(m_outputs[outputNo].sampleRate)); feature.hasTimestamp = true;