From 763255ad8fc731f298be99c5ebeb07791b748ed2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 2 Feb 2013 03:51:18 +0000 Subject: Divorce monitor rate from block size, send updates at 10Hz. Also add a simple attempt at staggering notification times to balance the buffer load and avoid massive spikes of all ports sending notifications at the same time. This should be quite a bit more sane when running at low latency. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5017 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/PortImpl.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server/PortImpl.hpp') diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index 45918964..2789c4f0 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -119,6 +119,9 @@ public: get_buffers(bufs, _buffers, poly, real_time); } + void activate(BufferFactory& bufs); + void deactivate(); + virtual void connect_buffers(); virtual void recycle_buffers(); @@ -202,12 +205,13 @@ protected: uint32_t _index; uint32_t _poly; uint32_t _buffer_size; + uint32_t _frames_since_monitor; + float _last_monitor_value; PortType _type; LV2_URID _buffer_type; Raul::Atom _value; Raul::Atom _min; Raul::Atom _max; - Raul::Atom _last_monitor_value; Raul::Array* _set_states; Raul::Array* _prepared_set_states; Raul::Array* _buffers; -- cgit v1.2.1