From 42953944da1261584d56405128c6eb3c0e9e7da0 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 1 May 2016 21:36:04 +0200 Subject: The last loader thread stuff. --- src/midimapper.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/midimapper.h') diff --git a/src/midimapper.h b/src/midimapper.h index 1887013..ea836e3 100644 --- a/src/midimapper.h +++ b/src/midimapper.h @@ -28,6 +28,8 @@ #include #include +#include +#include "mutex.h" typedef std::map midimap_t; typedef std::map instrmap_t; @@ -35,10 +37,16 @@ typedef std::map instrmap_t; class MidiMapper { public: - void clear(); - + //! Lookup note in map and return its index. + //! \returns -1 if not found or the note index. int lookup(int note); + //! Set new map sets. + void swap(instrmap_t& instrmap, midimap_t& midimap); + +private: instrmap_t instrmap; midimap_t midimap; + + std::mutex mutex; }; -- cgit v1.2.3