Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::dataplane::PublishCounter Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ note_publish()

void pulp::dataplane::PublishCounter::note_publish ( )
inlinenoexcept

Writer (audio/host) thread, from publish().

Relaxed: the counter orders no other memory, it only has to be monotonic and eventually visible.

◆ publish_seq()

std::uint32_t pulp::dataplane::PublishCounter::publish_seq ( ) const
inlinenoexcept

Reader (UI) thread. Changes iff the writer published since the last read.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/dataplane/include/pulp/dataplane/value_source.hpp