Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::host::HostEventIngress< Capacity > Class Template Referencefinal

Fixed-capacity host ingress staging area. More...

#include <graph_event_contract.hpp>

Public Member Functions

HostEventResult begin_block (std::uint64_t epoch, std::uint64_t sample_start, std::size_t frames) noexcept
HostEventResult publish (const HostEventRecord &event) noexcept
HostEventResult project (std::span< HostEventRecord > out, std::size_t &count) noexcept
 Copy events in [sample_start, sample_start + frames) into out.
HostEventResult end_block () noexcept
 Finish the current block. Future records remain staged.
void reset (std::uint64_t epoch) noexcept
std::uint64_t epoch () const noexcept
std::size_t pending () const noexcept
bool active () const noexcept

Detailed Description

template<std::size_t Capacity = 256>
class pulp::host::HostEventIngress< Capacity >

Fixed-capacity host ingress staging area.

Publication and block projection do not allocate. Future events remain staged for a later block; events before the current block are refused as late, so a caller cannot accidentally retime them to offset zero. A projection is transactional: insufficient output capacity leaves both the staged records and the destination span untouched.

Member Function Documentation

◆ active()

template<std::size_t Capacity = 256>
bool pulp::host::HostEventIngress< Capacity >::active ( ) const
inlinenoexcept

◆ begin_block()

template<std::size_t Capacity = 256>
HostEventResult pulp::host::HostEventIngress< Capacity >::begin_block ( std::uint64_t epoch,
std::uint64_t sample_start,
std::size_t frames )
inlinenoexcept

◆ end_block()

template<std::size_t Capacity = 256>
HostEventResult pulp::host::HostEventIngress< Capacity >::end_block ( )
inlinenoexcept

Finish the current block. Future records remain staged.

◆ epoch()

template<std::size_t Capacity = 256>
std::uint64_t pulp::host::HostEventIngress< Capacity >::epoch ( ) const
inlinenoexcept

◆ pending()

template<std::size_t Capacity = 256>
std::size_t pulp::host::HostEventIngress< Capacity >::pending ( ) const
inlinenoexcept

◆ project()

template<std::size_t Capacity = 256>
HostEventResult pulp::host::HostEventIngress< Capacity >::project ( std::span< HostEventRecord > out,
std::size_t & count )
inlinenoexcept

Copy events in [sample_start, sample_start + frames) into out.

The copied records retain absolute coordinates; callers derive the block-relative offset only after this preflight succeeds.

◆ publish()

template<std::size_t Capacity = 256>
HostEventResult pulp::host::HostEventIngress< Capacity >::publish ( const HostEventRecord & event)
inlinenoexcept

◆ reset()

template<std::size_t Capacity = 256>
void pulp::host::HostEventIngress< Capacity >::reset ( std::uint64_t epoch)
inlinenoexcept

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