summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-06-07 23:48:25 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-06-07 23:52:06 +0200
commitb6737efa307bb6dca6663bf8970dd0d444aa0af3 (patch)
tree50d4f78b8902a29a1129927a5d02ddde97a2cf87 /src/drumkitparser.cc
parent7c50c15ede76869489a94503fa22028180f41cff (diff)
Store bleed control support in settings.
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r--src/drumkitparser.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 2a49e47..d86957e 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -45,6 +45,8 @@ DrumKitParser::DrumKitParser(Settings& settings, DrumKit& k, Random& rand)
int DrumKitParser::parseFile(const std::string& filename)
{
+ settings.has_bleed_control.store(false);
+
auto edited_filename(filename);
if(refs.load())
@@ -182,6 +184,10 @@ void DrumKitParser::startTag(const std::string& name, const attr_t& attr)
{
cattr.main_state = (attr.at("main") == "true") ?
main_state_t::is_main : main_state_t::is_not_main;
+ if(cattr.main_state == main_state_t::is_main)
+ {
+ settings.has_bleed_control.store(true);
+ }
}
channelmap[attr.at("in")] = cattr;
@@ -198,7 +204,7 @@ void DrumKitParser::endTag(const std::string& name)
auto ptr = std::make_unique<Instrument>(settings, rand);
ptr->setGroup(instr_group);
- InstrumentParser parser(*ptr);
+ InstrumentParser parser(*ptr, settings);
parser.parseFile(path + "/" + instr_file);
// Transfer ownership to the DrumKit object.