aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina/MidiAction.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-10 04:54:15 +0000
committerDavid Robillard <d@drobilla.net>2007-02-10 04:54:15 +0000
commit87c0a475bd76ca33883eeafc2a86bc89a84eec2f (patch)
treef33b2a91e312d46ccd095065e62043a6e5d7a687 /src/engine/machina/MidiAction.hpp
parentb924ead0db7c09ee50d2d4eee487b844c5fb867b (diff)
downloadmachina-87c0a475bd76ca33883eeafc2a86bc89a84eec2f.tar.gz
machina-87c0a475bd76ca33883eeafc2a86bc89a84eec2f.tar.bz2
machina-87c0a475bd76ca33883eeafc2a86bc89a84eec2f.zip
Reorganization to make MIDI generic and abstract away driver functionality
(so actions are serializable and usable with many drivers). Partial commit, broken. git-svn-id: http://svn.drobilla.net/lad/machina@298 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina/MidiAction.hpp')
-rw-r--r--src/engine/machina/MidiAction.hpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp
new file mode 100644
index 0000000..2e1d1fc
--- /dev/null
+++ b/src/engine/machina/MidiAction.hpp
@@ -0,0 +1,47 @@
+/* This file is part of Machina.
+ * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
+ *
+ * Machina is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Machina is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef MACHINA_MIDIACTION_HPP
+#define MACHINA_MIDIACTION_HPP
+
+#include <raul/WeakPtr.h>
+#include "types.hpp"
+#include "Action.hpp"
+
+namespace Machina {
+
+class MidiDriver;
+
+
+class MidiAction : public Action {
+public:
+ JackNoteOnAction(WeakPtr<MidiDriver> driver,
+ size_t size,
+ unsigned char* event);
+
+ void execute(Timestamp time);
+
+private:
+ WeakPtr<MidiDriver> _driver;
+ size_t _size;
+ unsigned char* _event;
+};
+
+
+} // namespace Machina
+
+#endif // MACHINA_MIDIACTION_HPP