diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-05-22 10:39:49 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-05-22 10:39:49 +0200 |
commit | 158838f9b52d21610626f55964170a3e82f6ccdb (patch) | |
tree | 0dee778483d667209aca5f2a0a09d9f0c213bca0 /src/audioinputenginemidi.cc | |
parent | bef1d5542f926a3b942374707dd56041013d35ff (diff) | |
parent | 2699cb7d324ffb1d2adc62e1f62434397aa39e2d (diff) |
Merge with master
Diffstat (limited to 'src/audioinputenginemidi.cc')
-rw-r--r-- | src/audioinputenginemidi.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc index 5494462..7c1e13d 100644 --- a/src/audioinputenginemidi.cc +++ b/src/audioinputenginemidi.cc @@ -35,15 +35,19 @@ AudioInputEngineMidi::AudioInputEngineMidi() : refs(REFSFILE) { - refs.load(); is_valid = false; } bool AudioInputEngineMidi::loadMidiMap(std::string _f, Instruments &instruments) { std::string f = _f; - if(_f.size() > 1 && _f[0] == '@') { - f = refs.getValue(_f.substr(1)); + + if(refs.load()) { + if(_f.size() > 1 && _f[0] == '@') { + f = refs.getValue(_f.substr(1)); + } + } else { + ERR(drumkitparser, "Error reading refs.conf"); } file = ""; |