diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-12-05 20:34:12 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-12-05 20:34:12 +0100 |
commit | 3b0d9e0c9c5e08b2e449aa266617fb1db86b5a22 (patch) | |
tree | f203a59c944714925d73ae2d33ad9c67d5b17070 /src/drumkitparser.cc | |
parent | 29ec8552826f64bfa8cad01a433306886328c522 (diff) | |
parent | 2e7176bc558cb03d4e7c27769bab9cd45c703332 (diff) |
Merge branch 'resample'
Add resample support.
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r-- | src/drumkitparser.cc | 8 |
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"]; |