summaryrefslogtreecommitdiff
path: root/src/audioinputenginemidi.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/audioinputenginemidi.cc
parentc91ae2624f3d3c003c6b2065f3cc128b1b039801 (diff)
parentceda77eb38f0b0824f03348f5291e3a42d8f7306 (diff)
Merge remote-tracking branch 'origin' into diskstreaming
Conflicts: src/Makefile.am.drumgizmo src/drumgizmo.h
Diffstat (limited to 'src/audioinputenginemidi.cc')
-rw-r--r--src/audioinputenginemidi.cc30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc
index 82cafbf..5494462 100644
--- a/src/audioinputenginemidi.cc
+++ b/src/audioinputenginemidi.cc
@@ -28,15 +28,24 @@
#include "midimapparser.h"
+#include "drumgizmo.h"
+
#include <hugin.hpp>
AudioInputEngineMidi::AudioInputEngineMidi()
+ : refs(REFSFILE)
{
+ refs.load();
is_valid = false;
}
-bool AudioInputEngineMidi::loadMidiMap(std::string f, Instruments &instruments)
+bool AudioInputEngineMidi::loadMidiMap(std::string _f, Instruments &instruments)
{
+ std::string f = _f;
+ if(_f.size() > 1 && _f[0] == '@') {
+ f = refs.getValue(_f.substr(1));
+ }
+
file = "";
is_valid = false;
@@ -57,7 +66,7 @@ bool AudioInputEngineMidi::loadMidiMap(std::string f, Instruments &instruments)
mmap.instrmap[instruments[i]->name()] = i;
}
- file = f;
+ file = _f;
is_valid = true;
return true;
@@ -72,20 +81,3 @@ bool AudioInputEngineMidi::isValid()
{
return is_valid;
}
-
-#ifdef TEST_AUDIOINPUTENGINEMIDI
-//Additional dependency files
-//deps:
-//Required cflags (autoconf vars may be used)
-//cflags:
-//Required link options (autoconf vars may be used)
-//libs:
-#include "test.h"
-
-TEST_BEGIN;
-
-// TODO: Put some testcode here (see test.h for usable macros).
-
-TEST_END;
-
-#endif/*TEST_AUDIOINPUTENGINEMIDI*/