Mercurial > hg > match-vamp
changeset 148:d307803083e6 structure
Some conversion fixes
author | Chris Cannam |
---|---|
date | Thu, 22 Jan 2015 16:55:27 +0000 |
parents | 3673e2dae6a7 |
children | fcf0dd0166b1 |
files | Makefile.linux src/MatchVampPlugin.cpp test/TestFeatureExtractor.cpp |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.linux Thu Jan 22 12:04:44 2015 +0000 +++ b/Makefile.linux Thu Jan 22 16:55:27 2015 +0000 @@ -1,6 +1,6 @@ -#CXXFLAGS += -fPIC -ffast-math -O3 -Wall -Werror -Wfloat-conversion -CXXFLAGS += -fPIC -g -Wall -Werror -DPERFORM_ERROR_CHECKS=1 +CXXFLAGS += -fPIC -ffast-math -O3 -Wall -Werror -Wfloat-conversion +#CXXFLAGS += -fPIC -g -Wall -Werror -DPERFORM_ERROR_CHECKS=1 LDFLAGS += -Wl,-Bstatic -lvamp-sdk -Wl,-Bdynamic PLUGIN_LDFLAGS += -shared -Wl,-Bsymbolic -Wl,-z,defs -lpthread -Wl,--version-script=vamp-plugin.map
--- a/src/MatchVampPlugin.cpp Thu Jan 22 12:04:44 2015 +0000 +++ b/src/MatchVampPlugin.cpp Thu Jan 22 16:55:27 2015 +0000 @@ -211,7 +211,7 @@ desc.description = "Total frame energy threshold below which a feature will be regarded as silent"; desc.minValue = 0; desc.maxValue = 1; - desc.defaultValue = m_defaultFcParams.silenceThreshold; + desc.defaultValue = (float)m_defaultFcParams.silenceThreshold; desc.isQuantized = false; list.push_back(desc); @@ -282,7 +282,7 @@ } else if (name == "smooth") { return m_smooth ? 1.0 : 0.0; } else if (name == "silencethreshold") { - return m_fcParams.silenceThreshold; + return (float)m_fcParams.silenceThreshold; } return 0.0;
--- a/test/TestFeatureExtractor.cpp Thu Jan 22 12:04:44 2015 +0000 +++ b/test/TestFeatureExtractor.cpp Thu Jan 22 16:55:27 2015 +0000 @@ -14,7 +14,7 @@ static int freq2mid(double freq) { - return round(57.0 + 12.0 * log(freq / 220.) / log(2.)); + return int(round(57.0 + 12.0 * log(freq / 220.) / log(2.))); } static int freq2chroma(double freq)