25class ScalarTelemetryState;
26class MeterTelemetryState;
27class VectorTelemetryState;
28class EventTelemetryState;
41 std::array<float, kMaxChannels>
rms{};
42 std::array<float, kMaxChannels>
peak{};
50static_assert(std::is_trivially_copyable_v<MeterFrame>);
65 publish_seq_.fetch_add(1, std::memory_order_relaxed);
70 return publish_seq_.load(std::memory_order_relaxed);
74 std::atomic<std::uint32_t> publish_seq_{0};
95 detail::MeterTelemetryState* telemetry_ =
nullptr;
96 std::uint64_t writer_publication_ = 0;
117static_assert(std::is_trivially_copyable_v<VectorFrame>);
128static_assert(std::is_trivially_copyable_v<ValueEvent>);
137 std::array<ValueEvent, kMaxEvents>
events{};
145static_assert(std::is_trivially_copyable_v<EventFrame>);
162 void publish(
const float* samples,
int count);
170 detail::VectorTelemetryState* telemetry_ =
nullptr;
171 std::uint64_t writer_publication_ = 0;
193 detail::EventTelemetryState* telemetry_ =
nullptr;
195 std::uint64_t writer_publication_ = 0;
214 detail::ScalarTelemetryState* telemetry_ =
nullptr;
215 std::uint64_t writer_publication_ = 0;
Lock-free event channel: the writer publishes the occurrences from one audio block and the view reads...
Definition value_source.hpp:179
friend class ValueChannelSet
Definition value_source.hpp:191
EventFrame read()
Read the latest completed block from the reader thread.
void publish(const ValueEvent *events, int count)
Publish a block's occurrences from the writer thread.
Lock-free meter channel: the host publishes a MeterFrame from the audio/host thread; the view reads t...
Definition value_source.hpp:80
void publish(const MeterFrame &frame)
Publish the latest reading.
friend class ValueChannelSet
Definition value_source.hpp:93
MeterFrame read()
Read the latest published reading.
Monotonic publish counter, shared by every value source.
Definition value_source.hpp:60
std::uint32_t publish_seq() const noexcept
Reader (UI) thread. Changes iff the writer published since the last read.
Definition value_source.hpp:69
void note_publish() noexcept
Writer (audio/host) thread, from publish().
Definition value_source.hpp:64
Lock-free scalar channel: a single paint-safe cached number (a readout value, a modulation ring's bas...
Definition value_source.hpp:201
friend class ValueChannelSet
Definition value_source.hpp:212
void publish(float value)
Publish the latest value from the writer (audio/host) thread.
float read()
Read the latest value from the reader (UI) thread.
A processor's declared channels.
Definition value_channel_set.hpp:61
Lock-free vector channel: the writer publishes a block of samples, the view reads the latest block pa...
Definition value_source.hpp:154
void publish(const float *samples, int count)
Publish a block from the writer (audio/host) thread.
friend class ValueChannelSet
Definition value_source.hpp:168
VectorFrame read()
Read the latest published block from the reader (UI) thread.
Lock-free triple buffer for publishing the latest value from a writer thread to a reader thread witho...
Definition triple_buffer.hpp:45
Definition value_channel_telemetry.hpp:74
Definition audio_bridge.hpp:9
Definition child_process_manager.hpp:18
A bounded list of occurrences from one audio block.
Definition value_source.hpp:135
std::uint32_t publication
Source-owned generation used by a reader to identify this exact block.
Definition value_source.hpp:142
std::array< ValueEvent, kMaxEvents > events
Definition value_source.hpp:137
static constexpr int kMaxEvents
Definition value_source.hpp:136
int count
Definition value_source.hpp:138
A single multi-channel meter reading.
Definition value_source.hpp:39
std::array< float, kMaxChannels > rms
Definition value_source.hpp:41
std::array< float, kMaxChannels > peak
Definition value_source.hpp:42
int channels
Number of valid channels in rms/peak.
Definition value_source.hpp:47
static constexpr int kMaxChannels
Definition value_source.hpp:40
One occurrence inside an audio block.
Definition value_source.hpp:123
std::uint32_t frame_index
Definition value_source.hpp:124
float value
Definition value_source.hpp:125
A block of samples for a scope-style display — an envelope curve, a detector's output,...
Definition value_source.hpp:108
int count
Valid samples in samples.
Definition value_source.hpp:114
std::array< float, kMaxSamples > samples
Definition value_source.hpp:110
static constexpr int kMaxSamples
Definition value_source.hpp:109
Definition value_source.hpp:30
std::uint64_t publication
Definition value_source.hpp:32
T value
Definition value_source.hpp:31
Lock-free latest-value publication between two threads.