diff options
author | David Robillard <d@drobilla.net> | 2017-02-17 19:23:12 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-18 19:38:13 +0100 |
commit | 2754f232613dca72c2f964d092569faf1a176c80 (patch) | |
tree | 6a8966ca56acd74a42c691be5d900d221ceb348d /src/server/PortImpl.cpp | |
parent | fa6bb9afe8fcf2b0b8348495b9c4e1d6425136f0 (diff) | |
download | ingen-2754f232613dca72c2f964d092569faf1a176c80.tar.gz ingen-2754f232613dca72c2f964d092569faf1a176c80.tar.bz2 ingen-2754f232613dca72c2f964d092569faf1a176c80.zip |
Reduce Driver coupling
Diffstat (limited to 'src/server/PortImpl.cpp')
-rw-r--r-- | src/server/PortImpl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index 19f71953..1db98840 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -23,7 +23,6 @@ #include "Buffer.hpp" #include "BufferFactory.hpp" #include "Engine.hpp" -#include "Driver.hpp" #include "PortImpl.hpp" #include "PortType.hpp" #include "ThreadManager.hpp" @@ -39,8 +38,8 @@ static const uint32_t monitor_rate = 25.0; // Hz static inline uint32_t monitor_period(const Engine& engine) { - return std::max(engine.driver()->block_length(), - engine.driver()->sample_rate() / monitor_rate); + return std::max(engine.block_length(), + engine.sample_rate() / monitor_rate); } PortImpl::PortImpl(BufferFactory& bufs, @@ -183,7 +182,7 @@ PortImpl::activate(BufferFactory& bufs) monitor period, to spread the load out over time. Otherwise, every port would try to send an update at exactly the same time, every time. */ - const double srate = bufs.engine().driver()->sample_rate(); + const double srate = bufs.engine().sample_rate(); const uint32_t period = srate / monitor_rate; _frames_since_monitor = bufs.engine().frand() * period; _monitor_value = 0.0f; |