summaryrefslogtreecommitdiff
path: root/src/audioinputenginemidi.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-05-01 21:36:04 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-05-08 12:16:21 +0200
commit42953944da1261584d56405128c6eb3c0e9e7da0 (patch)
tree1f150ce606457a0bea5647374e0719ecd9646f01 /src/audioinputenginemidi.h
parentf8feb953c6d86bee12747679e5e4dac7795a65d0 (diff)
The last loader thread stuff.
Diffstat (limited to 'src/audioinputenginemidi.h')
-rw-r--r--src/audioinputenginemidi.h47
1 files changed, 21 insertions, 26 deletions
diff --git a/src/audioinputenginemidi.h b/src/audioinputenginemidi.h
index b892750..ed01395 100644
--- a/src/audioinputenginemidi.h
+++ b/src/audioinputenginemidi.h
@@ -24,48 +24,43 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_AUDIOINPUTENGINEMIDI_H__
-#define __DRUMGIZMO_AUDIOINPUTENGINEMIDI_H__
-
-#include "audioinputengine.h"
+#pragma once
#include <string>
+#include "audioinputengine.h"
#include "midimapper.h"
#include "instrument.h"
-
#include "configfile.h"
-class AudioInputEngineMidi : public AudioInputEngine {
+class AudioInputEngineMidi
+ : public AudioInputEngine
+{
public:
- AudioInputEngineMidi();
- virtual ~AudioInputEngineMidi() {}
-
- bool isMidiEngine() const { return true; }
+ AudioInputEngineMidi();
+ virtual ~AudioInputEngineMidi() = default;
- virtual bool init(const Instruments &instruments) = 0;
+ virtual bool init(const Instruments &instruments) = 0;
- virtual void setParm(const std::string& parm, const std::string& value) = 0;
+ virtual void setParm(const std::string& parm, const std::string& value) = 0;
- virtual bool start() = 0;
- virtual void stop() = 0;
+ virtual bool start() = 0;
+ virtual void stop() = 0;
- virtual void pre() = 0;
- virtual void run(size_t pos, size_t len, std::vector<event_t>& events) = 0;
- virtual void post() = 0;
+ virtual void pre() = 0;
+ virtual void run(size_t pos, size_t len, std::vector<event_t>& events) = 0;
+ virtual void post() = 0;
- bool loadMidiMap(const std::string& file, const Instruments& i);
+ bool loadMidiMap(const std::string& file, const Instruments& i);
- std::string getMidimapFile() const;
+ std::string getMidimapFile() const;
- bool isValid() const;
+ bool isValid() const;
protected:
- MidiMapper mmap;
- std::string midimap;
- bool is_valid;
+ MidiMapper mmap;
+ std::string midimap;
+ bool is_valid;
- ConfigFile refs;
+ ConfigFile refs;
};
-
-#endif/*__DRUMGIZMO_AUDIOINPUTENGINEMIDI_H__*/