diff options
Diffstat (limited to 'src/instrumentparser.cc')
-rw-r--r-- | src/instrumentparser.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index 6580b09..c66608b 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -79,7 +79,16 @@ void InstrumentParser::startTag(std::string name, DEBUG(instrparser,"Missing required attribute 'name'.\n"); return; } - s = new Sample(attr["name"]); + + float power; + if(attr.find("power") == attr.end()) { + power = -1; + } else { + power = atof(attr["power"].c_str()); + DEBUG(instrparser, "Instrument power set to %f\n", power); + } + + s = new Sample(attr["name"], power); } if(name == "audiofile") { |