Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity > Class Template Reference

Fixed-capacity graph command/event queues for realtime graph runtimes. More...

#include <graph_runtime_queue.hpp>

Public Member Functions

bool enqueue_command (const GraphCommand &command) noexcept
std::uint32_t drain_commands_for_block (std::span< GraphTimedCommand > out, std::uint32_t block_frames) noexcept
bool push_event_from_realtime (const GraphEvent &event) noexcept
bool pop_event (GraphEvent &event) noexcept
bool push_midi_output_from_realtime (const GraphMidiOutputEvent &event) noexcept
bool pop_midi_output (GraphMidiOutputEvent &event) noexcept
void reset_offline () noexcept
 Offline-only reset.
GraphRuntimeQueueStats stats () const noexcept

Static Public Member Functions

static constexpr std::size_t command_capacity () noexcept
static constexpr std::size_t event_capacity () noexcept
static constexpr std::size_t midi_output_capacity () noexcept

Detailed Description

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
class pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >

Fixed-capacity graph command/event queues for realtime graph runtimes.

Direction is explicit:

The class owns no heap storage after construction beyond the fixed FIFO storage owned by runtime::SpscQueue. It does not apply commands to a graph; graph runtimes consume GraphTimedCommand values and decide the mutation policy for the active snapshot.

Member Function Documentation

◆ command_capacity()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
constexpr std::size_t pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::command_capacity ( )
inlinestaticconstexprnoexcept

◆ drain_commands_for_block()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
std::uint32_t pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::drain_commands_for_block ( std::span< GraphTimedCommand > out,
std::uint32_t block_frames )
inlinenoexcept

◆ enqueue_command()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
bool pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::enqueue_command ( const GraphCommand & command)
inlinenoexcept

◆ event_capacity()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
constexpr std::size_t pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::event_capacity ( )
inlinestaticconstexprnoexcept

◆ midi_output_capacity()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
constexpr std::size_t pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::midi_output_capacity ( )
inlinestaticconstexprnoexcept

◆ pop_event()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
bool pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::pop_event ( GraphEvent & event)
inlinenoexcept

◆ pop_midi_output()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
bool pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::pop_midi_output ( GraphMidiOutputEvent & event)
inlinenoexcept

◆ push_event_from_realtime()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
bool pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::push_event_from_realtime ( const GraphEvent & event)
inlinenoexcept

◆ push_midi_output_from_realtime()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
bool pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::push_midi_output_from_realtime ( const GraphMidiOutputEvent & event)
inlinenoexcept

◆ reset_offline()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
void pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::reset_offline ( )
inlinenoexcept

Offline-only reset.

Call only when both the control producer and the realtime consumer/producer are stopped; this method drains both sides of every SPSC queue and resets diagnostic counters.

◆ stats()

template<std::size_t CommandCapacity = 128, std::size_t EventCapacity = 256, std::size_t MidiOutputCapacity = 256>
GraphRuntimeQueueStats pulp::graph::GraphRuntimeQueues< CommandCapacity, EventCapacity, MidiOutputCapacity >::stats ( ) const
inlinenoexcept

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