summaryrefslogtreecommitdiff
path: root/src/instrumentparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-25 20:04:08 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-25 20:04:08 +0200
commit64d8efa4f3abe4257120b85fb4d4a063d96edbfc (patch)
treed2cde0ad7b59c5f6acbf3c6792118ad3fda28fbf /src/instrumentparser.cc
parent541f6c214762cceb348f9657258c3db758ea667f (diff)
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.
Diffstat (limited to 'src/instrumentparser.cc')
-rw-r--r--src/instrumentparser.cc14
1 files changed, 7 insertions, 7 deletions
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);
+ }
}
}