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

#include <parameter_event_queue.hpp>

Public Types

using iterator = std::array<ParameterEvent, kCapacity>::iterator
using const_iterator = std::array<ParameterEvent, kCapacity>::const_iterator

Public Member Functions

 ParameterEventQueue ()=default
bool push (const ParameterEvent &e)
void clear ()
bool empty () const
std::size_t size () const
constexpr std::size_t capacity () const
bool overflowed () const
std::uint32_t dropped_event_count () const
std::uint64_t overflow_count () const
void reset_overflow_count ()
ParameterEventQueueTelemetry telemetry () const
void sort ()
void sort (std::span< ParameterEvent > scratch, std::span< std::uint32_t > offset_counts)
 sort() for a caller that can lend scratch storage, typically sized once at prepare time: a stable counting sort on sample_offset, O(n + range), when every offset lies in [0, offset_counts.size()) and scratch holds size() events; otherwise sort().
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
std::span< const ParameterEvent > events () const

Static Public Attributes

static constexpr std::size_t kCapacity = 1024

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ ParameterEventQueue()

pulp::state::ParameterEventQueue::ParameterEventQueue ( )
default

Member Function Documentation

◆ begin() [1/2]

iterator pulp::state::ParameterEventQueue::begin ( )
inline

◆ begin() [2/2]

const_iterator pulp::state::ParameterEventQueue::begin ( ) const
inline

◆ capacity()

std::size_t pulp::state::ParameterEventQueue::capacity ( ) const
inlineconstexpr

◆ clear()

void pulp::state::ParameterEventQueue::clear ( )
inline

◆ dropped_event_count()

std::uint32_t pulp::state::ParameterEventQueue::dropped_event_count ( ) const
inline

◆ empty()

bool pulp::state::ParameterEventQueue::empty ( ) const
inline

◆ end() [1/2]

iterator pulp::state::ParameterEventQueue::end ( )
inline

◆ end() [2/2]

const_iterator pulp::state::ParameterEventQueue::end ( ) const
inline

◆ events()

std::span< const ParameterEvent > pulp::state::ParameterEventQueue::events ( ) const
inline

◆ overflow_count()

std::uint64_t pulp::state::ParameterEventQueue::overflow_count ( ) const
inline

◆ overflowed()

bool pulp::state::ParameterEventQueue::overflowed ( ) const
inline

◆ push()

bool pulp::state::ParameterEventQueue::push ( const ParameterEvent & e)
inline

◆ reset_overflow_count()

void pulp::state::ParameterEventQueue::reset_overflow_count ( )
inline

◆ size()

std::size_t pulp::state::ParameterEventQueue::size ( ) const
inline

◆ sort() [1/2]

void pulp::state::ParameterEventQueue::sort ( )
inline

◆ sort() [2/2]

void pulp::state::ParameterEventQueue::sort ( std::span< ParameterEvent > scratch,
std::span< std::uint32_t > offset_counts )
inline

sort() for a caller that can lend scratch storage, typically sized once at prepare time: a stable counting sort on sample_offset, O(n + range), when every offset lies in [0, offset_counts.size()) and scratch holds size() events; otherwise sort().

Allocation-free either way.

◆ telemetry()

ParameterEventQueueTelemetry pulp::state::ParameterEventQueue::telemetry ( ) const
inline

Member Data Documentation

◆ kCapacity

std::size_t pulp::state::ParameterEventQueue::kCapacity = 1024
staticconstexpr

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