diff options
author | David Robillard <d@drobilla.net> | 2013-02-02 03:51:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-02 03:51:18 +0000 |
commit | 763255ad8fc731f298be99c5ebeb07791b748ed2 (patch) | |
tree | b1d163c3a7e1fb7b6b6a274aae040670485ee1bb /src/server/BlockImpl.cpp | |
parent | d049b582e1db60ee0f6fd02a40202145488c7288 (diff) | |
download | ingen-763255ad8fc731f298be99c5ebeb07791b748ed2.tar.gz ingen-763255ad8fc731f298be99c5ebeb07791b748ed2.tar.bz2 ingen-763255ad8fc731f298be99c5ebeb07791b748ed2.zip |
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
Diffstat (limited to 'src/server/BlockImpl.cpp')
-rw-r--r-- | src/server/BlockImpl.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp index 072b4049..76831436 100644 --- a/src/server/BlockImpl.cpp +++ b/src/server/BlockImpl.cpp @@ -84,9 +84,7 @@ BlockImpl::activate(BufferFactory& bufs) _activated = true; for (uint32_t p = 0; p < num_ports(); ++p) { PortImpl* const port = _ports->at(p); - port->setup_buffers(bufs, port->poly(), false); - port->connect_buffers(); - port->clear_buffers(); + port->activate(bufs); } } @@ -94,12 +92,9 @@ void BlockImpl::deactivate() { _activated = false; - for (uint32_t i = 0; i < _polyphony; ++i) { - for (uint32_t j = 0; j < num_ports(); ++j) { - PortImpl* const port = _ports->at(j); - if (port->is_output() && port->buffer(i)) - port->buffer(i)->clear(); - } + for (uint32_t p = 0; p < num_ports(); ++p) { + PortImpl* const port = _ports->at(p); + port->deactivate(); } } |