diff options
Diffstat (limited to 'src/engine/machina')
-rw-r--r-- | src/engine/machina/MidiAction.hpp | 9 | ||||
-rw-r--r-- | src/engine/machina/Node.hpp | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp index 2a9f91d..60d9189 100644 --- a/src/engine/machina/MidiAction.hpp +++ b/src/engine/machina/MidiAction.hpp @@ -34,6 +34,9 @@ class MidiAction : public Action { public: ~MidiAction(); + MidiAction(size_t size, + const unsigned char* event); + static SharedPtr<MidiAction> create(SharedPtr<Raul::Maid> maid, size_t size, const unsigned char* event) @@ -43,6 +46,9 @@ public: return ret; } + size_t event_size() { return _size; } + byte* event() { return _event.get(); } + bool set_event(size_t size, const byte* event); void execute(SharedPtr<Raul::MIDISink> driver, Raul::BeatTime time); @@ -50,8 +56,7 @@ public: virtual void write_state(Raul::RDFWriter& writer); private: - MidiAction(size_t size, - const unsigned char* event); + size_t _size; const size_t _max_size; diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp index bd1a66e..2f9c2e4 100644 --- a/src/engine/machina/Node.hpp +++ b/src/engine/machina/Node.hpp @@ -48,10 +48,13 @@ public: void add_enter_action(SharedPtr<Action> action); void remove_enter_action(SharedPtr<Action> action); - + void add_exit_action(SharedPtr<Action> action); void remove_exit_action(SharedPtr<Action> action); + SharedPtr<Action> enter_action() { return _enter_action; } + SharedPtr<Action> exit_action() { return _exit_action; } + void enter(SharedPtr<Raul::MIDISink> driver, BeatTime time); void exit(SharedPtr<Raul::MIDISink> driver, BeatTime time); |