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

Fixed-capacity, non-owning set of block-local bus views. More...

#include <process_block.hpp>

Public Member Functions

bool add_input (std::string_view name, audio::BufferView< const float > input, BusRole role=BusRole::Main, bool active=true) noexcept
bool add_output (std::string_view name, audio::BufferView< float > output, BusRole role=BusRole::Main, bool active=true) noexcept
void clear () noexcept
std::size_t size () const noexcept
std::size_t capacity () const noexcept
bool empty () const noexcept
std::span< BusBuffer > buses () noexcept
std::span< const BusBuffer > buses () const noexcept
BusBuffer * find (BusDirection direction, std::string_view name) noexcept
const BusBuffer * find (BusDirection direction, std::string_view name) const noexcept
BusBuffer * first (BusDirection direction, BusRole role=BusRole::Main) noexcept
const BusBuffer * first (BusDirection direction, BusRole role=BusRole::Main) const noexcept
bool validate_frame_count (std::size_t frame_count) const noexcept

Static Public Attributes

static constexpr std::size_t kMaxBuses = 16

Detailed Description

Fixed-capacity, non-owning set of block-local bus views.

Names are string_views owned by the caller. Audio memory is owned by the host or test harness. Adding buses never allocates and fails when capacity is exhausted. Duplicate bus names are caller-owned; find() returns the first matching (direction, name) pair.

Member Function Documentation

◆ add_input()

bool pulp::format::BusBufferSet::add_input ( std::string_view name,
audio::BufferView< const float > input,
BusRole role = BusRole::Main,
bool active = true )
inlinenoexcept

◆ add_output()

bool pulp::format::BusBufferSet::add_output ( std::string_view name,
audio::BufferView< float > output,
BusRole role = BusRole::Main,
bool active = true )
inlinenoexcept

◆ buses() [1/2]

std::span< const BusBuffer > pulp::format::BusBufferSet::buses ( ) const
inlinenoexcept

◆ buses() [2/2]

std::span< BusBuffer > pulp::format::BusBufferSet::buses ( )
inlinenoexcept

◆ capacity()

std::size_t pulp::format::BusBufferSet::capacity ( ) const
inlinenoexcept

◆ clear()

void pulp::format::BusBufferSet::clear ( )
inlinenoexcept

◆ empty()

bool pulp::format::BusBufferSet::empty ( ) const
inlinenoexcept

◆ find() [1/2]

const BusBuffer * pulp::format::BusBufferSet::find ( BusDirection direction,
std::string_view name ) const
inlinenoexcept

◆ find() [2/2]

BusBuffer * pulp::format::BusBufferSet::find ( BusDirection direction,
std::string_view name )
inlinenoexcept

◆ first() [1/2]

const BusBuffer * pulp::format::BusBufferSet::first ( BusDirection direction,
BusRole role = BusRole::Main ) const
inlinenoexcept

◆ first() [2/2]

BusBuffer * pulp::format::BusBufferSet::first ( BusDirection direction,
BusRole role = BusRole::Main )
inlinenoexcept

◆ size()

std::size_t pulp::format::BusBufferSet::size ( ) const
inlinenoexcept

◆ validate_frame_count()

bool pulp::format::BusBufferSet::validate_frame_count ( std::size_t frame_count) const
inlinenoexcept

Member Data Documentation

◆ kMaxBuses

std::size_t pulp::format::BusBufferSet::kMaxBuses = 16
staticconstexpr

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