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

A block of samples for a scope-style display — an envelope curve, a detector's output, a window of the signal a processor is actually working on. More...

#include <value_source.hpp>

Public Attributes

std::array< float, kMaxSamples > samples {}
int count = 0
 Valid samples in samples.

Static Public Attributes

static constexpr int kMaxSamples = 4096

Detailed Description

A block of samples for a scope-style display — an envelope curve, a detector's output, a window of the signal a processor is actually working on.

Fixed capacity with a runtime valid count, the same shape as MeterFrame and AudioProbeSnapshot. That is what keeps it trivially copyable, which is what lets it ride a TripleBuffer with no allocation on the publish path and no new lock-free code to get wrong. The cost is a flat 3 × 16 KB per vector channel whether or not the publisher fills it; a channel is opt-in, so a plugin that declares none pays nothing.

Member Data Documentation

◆ count

Valid samples in samples.

Consumers must still bound their index by min(count, kMaxSamples) — publish() clamps, but a frame read back from anywhere else is not guaranteed to have.

◆ kMaxSamples

int pulp::dataplane::VectorFrame::kMaxSamples = 4096
staticconstexpr

◆ samples


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