Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::au::MidiOutputPacketBuilder Struct Reference

#include <au_v2_common.hpp>

Public Member Functions

const MIDIPacketList * build (const midi::MidiBuffer &midi_out, std::uint32_t frame_count) noexcept
 Build a MIDIPacketList from midi_out into the internal buffer.

Public Attributes

std::array< std::uint8_t, kBufferBytes > storage {}
std::size_t dropped = 0

Static Public Attributes

static constexpr std::size_t kMaxOutputEvents = kMaxMidiEventsPerBlock
static constexpr std::size_t kBufferBytes = kMaxOutputEvents * 16

Member Function Documentation

◆ build()

const MIDIPacketList * pulp::format::au::MidiOutputPacketBuilder::build ( const midi::MidiBuffer & midi_out,
std::uint32_t frame_count )
inlinenoexcept

Build a MIDIPacketList from midi_out into the internal buffer.

frame_count is the current block size; per-event offsets are clamped to [0, frame_count - 1] so a stray out-of-block offset (mirroring the AU v3 input-side defensive clamp) never lands a packet past the block. Returns the packet list (pointing into storage) when at least one packet was written, or nullptr when there is nothing to send. The returned pointer is valid until the next build call or destruction. Allocation-free.

Member Data Documentation

◆ dropped

std::size_t pulp::format::au::MidiOutputPacketBuilder::dropped = 0

◆ kBufferBytes

std::size_t pulp::format::au::MidiOutputPacketBuilder::kBufferBytes = kMaxOutputEvents * 16
staticconstexpr

◆ kMaxOutputEvents

std::size_t pulp::format::au::MidiOutputPacketBuilder::kMaxOutputEvents = kMaxMidiEventsPerBlock
staticconstexpr

◆ storage

std::array<std::uint8_t, kBufferBytes> pulp::format::au::MidiOutputPacketBuilder::storage {}

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