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

Lock-free meter channel: the host publishes a MeterFrame from the audio/host thread; the view reads the latest frame paint-safe. More...

#include <value_source.hpp>

Public Member Functions

 ~MeterSource ()
void publish (const MeterFrame &frame)
 Publish the latest reading.
MeterFrame read ()
 Read the latest published reading.
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.

Friends

class ValueChannelSet

Detailed Description

Lock-free meter channel: the host publishes a MeterFrame from the audio/host thread; the view reads the latest frame paint-safe.

Exactly one writer and one reader thread (the TripleBuffer contract).

Constructor & Destructor Documentation

◆ ~MeterSource()

Member Function Documentation

◆ note_publish()

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

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

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

◆ publish()

Publish the latest reading.

Call from the writer (audio/host) thread. Alloc-free and non-blocking — a fixed-size copy into the back buffer.

◆ publish_seq()

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

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

◆ read()

Read the latest published reading.

Call from the reader (UI) thread. Returns by value so the caller never holds a reference into the buffer.

◆ ValueChannelSet

friend class ValueChannelSet
friend

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