Monotonic publish counter, shared by every value source. More...
#include <value_source.hpp>
Public Member Functions | |
| void | note_publish () noexcept |
| Writer (audio/host) thread, from publish(). | |
| std::uint32_t | publish_seq () const noexcept |
| Reader (UI) thread. Changes iff the writer published since the last read. | |
Monotonic publish counter, shared by every value source.
Staleness is "the writer stopped publishing", NOT "the value stopped changing" — and the two are genuinely different. A compressor holding a steady -6 dB of gain reduction publishes the same number every block and must keep reading -6; a processor whose audio stopped publishes nothing and must decay to its neutral. Comparing values cannot tell those apart, so a reader watches this counter instead.
|
inlinenoexcept |
Writer (audio/host) thread, from publish().
Relaxed: the counter orders no other memory, it only has to be monotonic and eventually visible.
|
inlinenoexcept |
Reader (UI) thread. Changes iff the writer published since the last read.