diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-22 07:34:11 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-08-12 11:11:47 +0200 |
commit | cddccda9be195cb411d85c887a8f20b30d310d34 (patch) | |
tree | 4c186ad966060f1a3d1a44d07d7848a225b63dc5 /src/dgxmlparser.cc | |
parent | 02226ccac3ce01b1afb5e320ccf980f5b735597a (diff) |
Make filechannel attribute optional in instrument xml files.
Diffstat (limited to 'src/dgxmlparser.cc')
-rw-r--r-- | src/dgxmlparser.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dgxmlparser.cc b/src/dgxmlparser.cc index 8fdcec4..8599b2b 100644 --- a/src/dgxmlparser.cc +++ b/src/dgxmlparser.cc @@ -189,7 +189,8 @@ bool parseInstrumentFile(const std::string& filename, InstrumentDOM& dom) dom.samples.back().audiofiles.emplace_back(); res &= attrcpy(dom.samples.back().audiofiles.back().instrument_channel, audiofile, "channel"); res &= attrcpy(dom.samples.back().audiofiles.back().file, audiofile, "file"); - res &= attrcpy(dom.samples.back().audiofiles.back().filechannel, audiofile, "filechannel"); + dom.samples.back().audiofiles.back().filechannel = 1; // Defaults to channel 1 in mono (1-based) + res &= attrcpy(dom.samples.back().audiofiles.back().filechannel, audiofile, "filechannel", true); } } |