From 64d8efa4f3abe4257120b85fb4d4a063d96edbfc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 25 Apr 2014 20:04:08 +0200 Subject: Use old 'velocity groups' algorithm on version 1.0 instruments and new 'power distribution' algorithm on 2.0 instruments. Remove 'with-experimental' option from configure. --- src/instrumentparser.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/instrumentparser.cc') diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index 3a07f1f..0889d74 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -60,14 +60,14 @@ void InstrumentParser::startTag(std::string name, if(attr.find("version") != attr.end()) { try { - instrument._version = VersionStr(attr["version"]); + instrument.version = VersionStr(attr["version"]); } catch(const char *err) { ERR(instrparser, "Error parsing version number: %s, using 1.0\n", err); - instrument._version = VersionStr(1,0,0); + instrument.version = VersionStr(1,0,0); } } else { WARN(instrparser, "Missing version number, assuming 1.0\n"); - instrument._version = VersionStr(1,0,0); + instrument.version = VersionStr(1,0,0); } } @@ -161,10 +161,10 @@ void InstrumentParser::startTag(std::string name, return; } -#ifndef EXPERIMENTAL - // TODO: Old algorithm needs this here. - instrument.addSample(lower, upper, sample); -#endif/*EXPERIMENTAL*/ + if(instrument.version == VersionStr("1.0")) { + // Old "velocity group" algorithm needs this + instrument.addSample(lower, upper, sample); + } } } -- cgit v1.2.3