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

#include <buffered_content_source.hpp>

Public Attributes

std::uint32_t channels = 0
std::uint64_t declared_frames = 0
 Frames the content declares it will produce.
std::uint32_t sample_rate = 0
std::uint64_t max_pull_frames = 0
 Largest block the audio thread will request in one pull.
std::uint64_t ring_capacity_frames = 0
 Ring capacity in frames.
std::uint64_t produce_chunk_frames = 4096
 How much the pump asks the producer for per refill step.
std::uint64_t preroll_frames = 0
 Frames synchronously produced into the ring during prepare() and again after every seek, guaranteed present before the next pull.
std::uint64_t loop_start_frame = 0
 Declared loop region [loop_start_frame, loop_end_frame).
std::uint64_t loop_end_frame = 0
BufferedContentEpoch initial_epoch = 1
 First production epoch.
bool start_background_thread = false
 Spawn an owned producer thread.

Member Data Documentation

◆ channels

std::uint32_t pulp::playback::BufferedContentSourceConfig::channels = 0

◆ declared_frames

std::uint64_t pulp::playback::BufferedContentSourceConfig::declared_frames = 0

Frames the content declares it will produce.

Starvation is measured against this, so a producer that stops early is counted as starving rather than as having finished.

◆ initial_epoch

BufferedContentEpoch pulp::playback::BufferedContentSourceConfig::initial_epoch = 1

First production epoch.

Must be nonzero; later seeks and loop wraps must each pass a strictly newer epoch than the one before.

◆ loop_end_frame

std::uint64_t pulp::playback::BufferedContentSourceConfig::loop_end_frame = 0

◆ loop_start_frame

std::uint64_t pulp::playback::BufferedContentSourceConfig::loop_start_frame = 0

Declared loop region [loop_start_frame, loop_end_frame).

Both zero declares no loop. The source never wraps on its own: the transport owns looping and calls loop_wrap() at the boundary, which restarts production at the loop head under a strictly newer epoch.

◆ max_pull_frames

std::uint64_t pulp::playback::BufferedContentSourceConfig::max_pull_frames = 0

Largest block the audio thread will request in one pull.

◆ preroll_frames

std::uint64_t pulp::playback::BufferedContentSourceConfig::preroll_frames = 0

Frames synchronously produced into the ring during prepare() and again after every seek, guaranteed present before the next pull.

Zero defers all production to the pump. A producer that cannot fill the declared preroll synchronously fails prepare()/seek() — the guarantee is enforced, not sampled.

◆ produce_chunk_frames

std::uint64_t pulp::playback::BufferedContentSourceConfig::produce_chunk_frames = 4096

How much the pump asks the producer for per refill step.

◆ ring_capacity_frames

std::uint64_t pulp::playback::BufferedContentSourceConfig::ring_capacity_frames = 0

Ring capacity in frames.

Zero derives it from the larger of the declaration's wall-clock lookahead, max_pull_frames, and preroll_frames.

◆ sample_rate

std::uint32_t pulp::playback::BufferedContentSourceConfig::sample_rate = 0

◆ start_background_thread

bool pulp::playback::BufferedContentSourceConfig::start_background_thread = false

Spawn an owned producer thread.

Off by default so a caller drives pump_background() deterministically.


The documentation for this struct was generated from the following file: