diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-17 21:27:52 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-17 21:27:52 +0200 |
commit | 0e048dee411cc20beb2a8667e5bb339f9b7fb939 (patch) | |
tree | c9bacf6f2491f5ae6feb4f4786688ef5659f5c9b /src/drumkitparser.cc | |
parent | b6405171c6a74a5227555a9b75c03f88a5f21ed2 (diff) |
New resample feature on output channels.
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"]; |