summaryrefslogtreecommitdiff
path: root/src/audioinputenginemidi.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/audioinputenginemidi.cc')
-rw-r--r--src/audioinputenginemidi.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc
index 5986471..6aa9d45 100644
--- a/src/audioinputenginemidi.cc
+++ b/src/audioinputenginemidi.cc
@@ -26,15 +26,23 @@
*/
#include "audioinputenginemidi.h"
-void InputLV2::loadMidiMap(std::string f)
+#include "midimapparser.h"
+
+#include <hugin.hpp>
+
+void AudioInputEngineMidi::loadMidiMap(std::string f, Instruments &instruments)
{
+ DEBUG(mmap, "loadMidiMap(%s, i.size() == %d)\n", f.c_str(),
+ instruments.size());
if(f == "") return;
MidiMapParser p(f);
if(p.parse()) {/*return false;*/}
+
+ mmap.clear();
mmap.midimap = p.midimap;
- for(size_t i = 0; i < instruments->size(); i++) {
- mmap.instrmap[(*instruments)[i]->name()] = i;
+ for(size_t i = 0; i < instruments.size(); i++) {
+ mmap.instrmap[instruments[i]->name()] = i;
}
}