diff options
author | David Robillard <d@drobilla.net> | 2011-08-20 20:59:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-08-20 20:59:48 +0000 |
commit | 769fd5a2c60ef39f0af68664b35c99f90b8d715b (patch) | |
tree | cfaeacafbeba957a349bc1511da86c988685f6e2 /src/server/Context.hpp | |
parent | c2d440f132983a1068caa23e6c3832ddecbabaa9 (diff) | |
download | ingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.tar.gz ingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.tar.bz2 ingen-769fd5a2c60ef39f0af68664b35c99f90b8d715b.zip |
Fix crash when sending port notifications (fix #741).
Use a simpler system for port change notifications (abusing Event, which is virtual and thus can't be ringbuffered safely, was the cause of this crash).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3438 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/Context.hpp')
-rw-r--r-- | src/server/Context.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/server/Context.hpp b/src/server/Context.hpp index d2d1b11f..f30b11d5 100644 --- a/src/server/Context.hpp +++ b/src/server/Context.hpp @@ -18,6 +18,8 @@ #ifndef INGEN_ENGINE_CONTEXT_HPP #define INGEN_ENGINE_CONTEXT_HPP +#include "raul/RingBuffer.hpp" + #include "shared/World.hpp" #include "Engine.hpp" @@ -52,7 +54,7 @@ public: Context(Engine& engine, ID id) : _engine(engine) , _id(id) - , _event_sink(engine, engine.event_queue_size()) + , _event_sink(engine.event_queue_size()) , _start(0) , _end(0) , _nframes(0) @@ -85,14 +87,15 @@ public: inline SampleCount offset() const { return _offset; } inline bool realtime() const { return _realtime; } - inline const EventSink& event_sink() const { return _event_sink; } - inline EventSink& event_sink() { return _event_sink; } + inline const Raul::RingBuffer & event_sink() const { return _event_sink; } + inline Raul::RingBuffer& event_sink() { return _event_sink; } protected: Engine& _engine; ///< Engine we're running in ID _id; ///< Fast ID for this context - EventSink _event_sink; ///< Sink for events generated in a realtime context + Raul::RingBuffer _event_sink; ///< Port updates from process context + FrameTime _start; ///< Start frame of this cycle, timeline relative FrameTime _end; ///< End frame of this cycle, timeline relative SampleCount _nframes; ///< Length of this cycle in frames |