summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dgxmlparser.cc3
-rw-r--r--src/domloader.cc2
2 files changed, 3 insertions, 2 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);
}
}
diff --git a/src/domloader.cc b/src/domloader.cc
index e095acb..663ef75 100644
--- a/src/domloader.cc
+++ b/src/domloader.cc
@@ -104,7 +104,7 @@ bool DOMLoader::loadDom(const std::string& basepath,
auto audio_file =
std::make_unique<AudioFile>(path + "/" + audiofiledom.file,
- audiofiledom.filechannel - 1,
+ audiofiledom.filechannel - 1, // xml is 1-based
instrument_channel);
sample->addAudioFile(instrument_channel,