# HG changeset patch # User cannam # Date 1180963864 0 # Node ID 47d6e670a810abca32f1a7e9f69519ddf4d510f0 # Parent 4017e21c12ddba975384117f19322b17c00e7740 * avoid warning about float-to-int conversion on frame2RealTime * define pi if it isn't already for some reason diff -r 4017e21c12dd -r 47d6e670a810 vamp-sdk/hostext/PluginInputDomainAdapter.cpp --- a/vamp-sdk/hostext/PluginInputDomainAdapter.cpp Mon Jun 04 10:55:46 2007 +0000 +++ b/vamp-sdk/hostext/PluginInputDomainAdapter.cpp Mon Jun 04 13:31:04 2007 +0000 @@ -170,6 +170,11 @@ return blockSize; } +// for some visual studii apparently +#ifndef M_PI +#define M_PI 3.14159265358979232846 +#endif + Plugin::FeatureSet PluginInputDomainAdapter::process(const float *const *inputBuffers, RealTime timestamp) { @@ -221,8 +226,8 @@ // std::cerr << "PluginInputDomainAdapter: sampleRate " << m_inputSampleRate << ", blocksize " << m_blockSize << ", adjusting time from " << timestamp; - timestamp = timestamp + RealTime::frame2RealTime(m_blockSize/2, - m_inputSampleRate); + timestamp = timestamp + RealTime::frame2RealTime + (m_blockSize/2, int(m_inputSampleRate + 0.5)); // std::cerr << " to " << timestamp << std::endl;