From 5dc6649496e938b32a5fe9f341de6cce962d3731 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Jul 2006 22:24:00 +0000 Subject: Enforced OSC path restrictions on Path for spec conformance (since GraphObject paths will soon be part of OSC paths) git-svn-id: http://svn.drobilla.net/lad/ingen@88 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Event.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/libs/engine/Event.h') diff --git a/src/libs/engine/Event.h b/src/libs/engine/Event.h index 355525cf..604d1e19 100644 --- a/src/libs/engine/Event.h +++ b/src/libs/engine/Event.h @@ -43,26 +43,29 @@ class Event : public MaidObject public: virtual ~Event() {} - /** Execute event, MUST be realtime safe */ - virtual void execute(samplecount offset) { assert(!m_executed); m_executed = true; } + /** Execute this event in the audio thread (MUST be realtime safe). */ + virtual void execute(samplecount offset) { assert(!_executed); _executed = true; } - /** Perform any actions after execution (ie send OSC response to client). - * No realtime requirement. */ + /** Perform any actions after execution (ie send replies to commands) + * (no realtime requirements). */ virtual void post_process() {} - inline samplecount time_stamp() { return m_time_stamp; } + inline samplecount time_stamp() { return _time_stamp; } protected: - Event(CountedPtr responder); - Event(); - // Prevent copies Event(const Event&); Event& operator=(const Event&); + + Event(CountedPtr responder, samplecount timestamp) + : _responder(responder) + , _time_stamp(timestamp) + , _executed(false) + {} - CountedPtr m_responder; - samplecount m_time_stamp; - bool m_executed; + CountedPtr _responder; + samplecount _time_stamp; + bool _executed; }; -- cgit v1.2.1