From 7aff3e6c4736690b9bc3e900a61c8ab8d172bf26 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 14 May 2016 11:56:44 +0200 Subject: Temporary fix for midimap loading in command line tool. --- drumgizmo/input/midifile.cc | 8 ++++---- drumgizmo/input/midifile.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'drumgizmo/input') diff --git a/drumgizmo/input/midifile.cc b/drumgizmo/input/midifile.cc index 76dff12..27a8e04 100644 --- a/drumgizmo/input/midifile.cc +++ b/drumgizmo/input/midifile.cc @@ -59,7 +59,7 @@ bool MidifileInputEngine::init(const Instruments& instruments) std::cerr << "[MidifileInputEngine] Missing midi filename\n"; return false; } - if(midimap == "") + if(midimap_file == "") { std::cerr << "[MidifileInputEngine] Missing midimap filename\n"; return false; @@ -71,10 +71,10 @@ bool MidifileInputEngine::init(const Instruments& instruments) << "'\n"; return false; } - if(!loadMidiMap(midimap, instruments)) + if(!loadMidiMap(midimap_file, instruments)) { std::cerr << "[MidifileInputEngine] Failed to parse midimap '" - << midimap << "'\n"; + << midimap_file << "'\n"; return false; } return true; @@ -103,7 +103,7 @@ void MidifileInputEngine::setParm(const std::string& parm, const std::string& va else if(parm == "midimap") { // apply midimap filename - midimap = value; + midimap_file = value; } else if(parm == "loop") { diff --git a/drumgizmo/input/midifile.h b/drumgizmo/input/midifile.h index 08dc249..a0e8fa6 100644 --- a/drumgizmo/input/midifile.h +++ b/drumgizmo/input/midifile.h @@ -54,6 +54,7 @@ private: smf_t* smf; smf_event_t* current_event; + std::string midimap_file; std::string file; float speed; int track; -- cgit v1.2.3