summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-16 08:35:39 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-05-16 08:35:39 +0200
commit0adc05286d97536637d01ed0a295d45f7bb60c1d (patch)
tree7f06e82a515d4ab47f5c944eaec98c2b43b8c146 /src/drumkitparser.cc
parentc91ae2624f3d3c003c6b2065f3cc128b1b039801 (diff)
parentceda77eb38f0b0824f03348f5291e3a42d8f7306 (diff)
Merge remote-tracking branch 'origin' into diskstreaming
Conflicts: src/Makefile.am.drumgizmo src/drumgizmo.h
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r--src/drumkitparser.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 2c21c52..00232b2 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -32,10 +32,20 @@
#include "instrumentparser.h"
#include "path.h"
+#include "drumgizmo.h"
-DrumKitParser::DrumKitParser(const std::string &kitfile, DrumKit &k)
+DrumKitParser::DrumKitParser(const std::string &file, DrumKit &k)
: kit(k)
+ , refs(REFSFILE)
{
+ refs.load();
+
+ std::string kitfile = file;
+
+ if(file.size() > 1 && file[0] == '@') {
+ kitfile = refs.getValue(file.substr(1));
+ }
+
// instr = NULL;
path = getPath(kitfile);
@@ -45,7 +55,7 @@ DrumKitParser::DrumKitParser(const std::string &kitfile, DrumKit &k)
if(!fd) return;
- kit._file = kitfile;
+ kit._file = file;
}
DrumKitParser::~DrumKitParser()