diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-09-15 09:28:15 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-09-15 09:28:15 +0200 |
commit | 22e8c588324184b777cea9f55ec0fc73b56949b8 (patch) | |
tree | cb75167772447848650d90b01c171b344cdc61e3 /src/drumkitparser.cc | |
parent | 9883fb4fc232ebdea44dcf7b015499d31f999695 (diff) |
New experimental sample selector (enable using --with-experimental argument on ./configure).
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r-- | src/drumkitparser.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index 9100b5b..d838346 100644 --- a/src/drumkitparser.cc +++ b/src/drumkitparser.cc @@ -60,6 +60,18 @@ void DrumKitParser::startTag(std::string name, if(attr.find("description") != attr.end()) kit._description = attr["description"]; + + if(attr.find("version") != attr.end()) { + try { + kit._version = VersionStr(attr["version"]); + } catch(const char *err) { + ERR(kitparser, "Error parsing version number: %s, using 1.0\n", err); + kit._version = VersionStr(1,0,0); + } + } else { + WARN(kitparser, "Missing version number, assuming 1.0\n"); + kit._version = VersionStr(1,0,0); + } } if(name == "channels") {} |