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

#include <generated_event_source.hpp>

Classes

struct  Stats

Public Member Functions

 GeneratedEventSource ()
 ~GeneratedEventSource ()
 GeneratedEventSource (const GeneratedEventSource &)=delete
GeneratedEventSource & operator= (const GeneratedEventSource &)=delete
bool prepare (const GeneratedEventSourceConfig &config)
 Quiescent control thread.
bool begin_playback_epoch (std::uint64_t playback_epoch) noexcept
 Quiescent control thread.
void release () noexcept
 Quiescent control thread. No producer or consumer may be active.
GeneratedEventStageResult stage (GeneratedEventSpan span, GeneratedEventRevision revision, std::span< const GeneratedEvent > events) noexcept
 Producer thread.
GeneratedEventCommitResult commit_through (std::uint64_t playback_epoch, timebase::MonotonicBeat boundary, GeneratedEventCommitGeneration generation) noexcept
 Producer thread.
GeneratedEventPullResult pull (GeneratedEventSpan requested, std::span< GeneratedEvent > output) noexcept
 Audio thread.
GeneratedEventDegradation record_deadline_miss () noexcept
 Select or reset producer-declared fallback policy.
void record_deadline_met () noexcept
GeneratedEventDegradation current_degradation () const noexcept
bool prepared () const noexcept
Stats stats () const noexcept

Static Public Attributes

static constexpr audio::RtSafetyClass pull_rt_safety_class

Constructor & Destructor Documentation

◆ GeneratedEventSource() [1/2]

pulp::playback::GeneratedEventSource::GeneratedEventSource ( )

◆ ~GeneratedEventSource()

pulp::playback::GeneratedEventSource::~GeneratedEventSource ( )

◆ GeneratedEventSource() [2/2]

pulp::playback::GeneratedEventSource::GeneratedEventSource ( const GeneratedEventSource & )
delete

Member Function Documentation

◆ begin_playback_epoch()

bool pulp::playback::GeneratedEventSource::begin_playback_epoch ( std::uint64_t playback_epoch)
noexcept

Quiescent control thread.

Starts a nonzero first playback epoch or a strictly newer seek/restart epoch, invalidating all pending work and live fallback selection. Preserves storage and cumulative telemetry.

◆ commit_through()

GeneratedEventCommitResult pulp::playback::GeneratedEventSource::commit_through ( std::uint64_t playback_epoch,
timebase::MonotonicBeat boundary,
GeneratedEventCommitGeneration generation )
noexcept

Producer thread.

Atomically publishes every staged batch ending at or before this exact quantized boundary. Generation is nonzero and strictly increasing, even for a commit that contains no event batches.

◆ current_degradation()

GeneratedEventDegradation pulp::playback::GeneratedEventSource::current_degradation ( ) const
noexcept

◆ operator=()

GeneratedEventSource & pulp::playback::GeneratedEventSource::operator= ( const GeneratedEventSource & )
delete

◆ prepare()

bool pulp::playback::GeneratedEventSource::prepare ( const GeneratedEventSourceConfig & config)

Quiescent control thread.

Allocates all staging, committed-ring and event storage. The quantization grid must be positive and the degradation ladder nonempty, duplicate-free and end in Silence.

◆ prepared()

bool pulp::playback::GeneratedEventSource::prepared ( ) const
inlinenoexcept

◆ pull()

GeneratedEventPullResult pulp::playback::GeneratedEventSource::pull ( GeneratedEventSpan requested,
std::span< GeneratedEvent > output )
noexcept

Audio thread.

Consumes the exact requested span. A missing, stale or oversized batch advances the elapsed frontier rather than sliding late events into a later span.

◆ record_deadline_met()

void pulp::playback::GeneratedEventSource::record_deadline_met ( )
noexcept

◆ record_deadline_miss()

GeneratedEventDegradation pulp::playback::GeneratedEventSource::record_deadline_miss ( )
noexcept

Select or reset producer-declared fallback policy.

Consuming an already committed batch does not imply that the producer met its deadline. Musical thinning remains producer-owned.

◆ release()

void pulp::playback::GeneratedEventSource::release ( )
noexcept

Quiescent control thread. No producer or consumer may be active.

◆ stage()

GeneratedEventStageResult pulp::playback::GeneratedEventSource::stage ( GeneratedEventSpan span,
GeneratedEventRevision revision,
std::span< const GeneratedEvent > events )
noexcept

Producer thread.

Copies a new future batch, or replaces an exact staged span when revision is strictly newer. Published/frozen spans are never reachable from this path.

◆ stats()

Stats pulp::playback::GeneratedEventSource::stats ( ) const
noexcept

Member Data Documentation

◆ pull_rt_safety_class

audio::RtSafetyClass pulp::playback::GeneratedEventSource::pull_rt_safety_class
staticconstexpr
Initial value:

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