summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r--src/drumkitparser.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 1b7ecaf..2c21c52 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -60,6 +60,14 @@ void DrumKitParser::startTag(std::string name,
if(attr.find("name") != attr.end())
kit._name = attr["name"];
+ if(attr.find("samplerate") != attr.end()) {
+ kit._samplerate = atoi(attr["samplerate"].c_str());
+ } else {
+ // If 'samplerate' attribute is missing, assume 44k1Hz
+ // TODO: Ask instrument what samplerate is in the audiofiles...
+ kit._samplerate = 44100;
+ }
+
if(attr.find("description") != attr.end())
kit._description = attr["description"];