diff options
author | David Robillard <d@drobilla.net> | 2017-03-20 02:15:55 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-20 03:19:33 +0100 |
commit | c9ab482f4acec0dae1a49bff245365ff7d8e536f (patch) | |
tree | 2bb8902c7590d06914840217ef2eec5e399667a3 /src | |
parent | bc0f5b77bc52054216790d48a7d09dc36c51b4f4 (diff) | |
download | ingen-c9ab482f4acec0dae1a49bff245365ff7d8e536f.tar.gz ingen-c9ab482f4acec0dae1a49bff245365ff7d8e536f.tar.bz2 ingen-c9ab482f4acec0dae1a49bff245365ff7d8e536f.zip |
Use more efficient memory barriers
Diffstat (limited to 'src')
-rw-r--r-- | src/server/PortImpl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index b7331aff..88d25f63 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -188,7 +188,8 @@ PortImpl::activate(BufferFactory& bufs) _monitor_value = 0.0f; _peak = 0.0f; - _connected_flag.clear(); // Trigger buffer re-connect next cycle + // Trigger buffer re-connect next cycle + _connected_flag.clear(std::memory_order_release); } void @@ -540,7 +541,7 @@ PortImpl::update_values(SampleCount offset, uint32_t voice) void PortImpl::pre_process(RunContext& context) { - if (!_connected_flag.test_and_set()) { + if (!_connected_flag.test_and_set(std::memory_order_acquire)) { connect_buffers(); clear_buffers(); } |