summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-20 19:44:13 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-20 19:44:13 +0100
commit75491ae08b645e784b260b2d28e246a441de7f32 (patch)
treea588477dd0b2d1b25c33712045223112446db8d1 /src/drumgizmo.h
parent7c0d78d164cbce489cea672f110a4f3f96515ea1 (diff)
Added initial code for a GUI<->engine message system.
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index e79dad0..92faa3c 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -41,6 +41,8 @@
#include "mutex.h"
+#include "message.h"
+
#define MAX_NUM_CHANNELS 512
class DrumGizmo {
@@ -68,7 +70,20 @@ public:
std::string midimapfile;
std::string kitfile;
+ /*
+ * Send a message to the engine. The engine takes over the memory.
+ */
+ void sendMessage(Message *msg);
+
+ /*
+ * Receive message from the engine. The caller takes over the memory.
+ */
+ Message *receiveMessage();
+
private:
+ Mutex message_mutex;
+ std::list<Message *> message_queue;
+
DrumKitLoader loader;
Mutex mutex;