From c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 22 Sep 2007 23:51:00 +0000 Subject: Type oblivious set_port_value interface. git-svn-id: http://svn.drobilla.net/lad/ingen@765 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/SetPortValueEvent.hpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src/libs/engine/events/SetPortValueEvent.hpp') diff --git a/src/libs/engine/events/SetPortValueEvent.hpp b/src/libs/engine/events/SetPortValueEvent.hpp index da378347..4b6e8d92 100644 --- a/src/libs/engine/events/SetPortValueEvent.hpp +++ b/src/libs/engine/events/SetPortValueEvent.hpp @@ -35,18 +35,34 @@ class Port; class SetPortValueEvent : public Event { public: - SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path, Sample val); - SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); + SetPortValueEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + const string& port_path, + uint32_t data_size, + const void* data); + + SetPortValueEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + uint32_t voice_num, + const string& port_path, + uint32_t data_size, + const void* data); + + ~SetPortValueEvent(); void execute(SampleCount nframes, FrameTime start, FrameTime end); void post_process(); private: - enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH }; + enum ErrorType { NO_ERROR, PORT_NOT_FOUND, NO_SPACE }; - int _voice_num; + bool _omni; + uint32_t _voice_num; string _port_path; - float _val; + uint32_t _data_size; + void* _data; Port* _port; ErrorType _error; }; -- cgit v1.2.1