Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator > Class Reference

Prepared slot facade. More...

#include <voice_runtime_facade.hpp>

Public Types

using Owner = InstrumentVoiceAllocator

Public Member Functions

 VoiceRuntimeFacade (Owner &owner) noexcept
Owner & owner () noexcept
const Owner & owner () const noexcept
std::uint32_t voice_count () const noexcept
std::uint32_t active_voice_count () const noexcept
std::uint32_t allocated_voice_count () const noexcept
bool set_steal_policy (VoiceStealPolicy policy) noexcept
VoiceStealPolicy steal_policy () const noexcept
void set_termination_fade_frames (std::uint32_t frames) noexcept
AllocatedVoiceRuntimeTriggerResult trigger (const InstrumentVoiceTrigger &trigger, std::span< VoiceTermination > terminations, std::span< VoiceModulationBuffer > modulation) noexcept
bool release_voice (std::uint32_t voice_index) noexcept
std::uint32_t release_note (int note, std::uint32_t sample_id=kInvalidSampleId) noexcept
bool finish_voice (std::uint32_t voice_index, std::span< VoiceModulationBuffer > modulation) noexcept
std::span< const InstrumentVoice > voices () const noexcept
VoiceSumResult mix (std::span< const VoiceSumInput > inputs, BufferView< float > destination, std::uint64_t frames, const VoiceSumOptions &options={}) const noexcept
VoiceRuntimeFacadeStatus reset (std::span< VoiceModulationBuffer > modulation) noexcept

Detailed Description

Prepared slot facade.

The trigger overload requires exactly one prepared modulation buffer and one termination-record slot per allocator voice. The spans are borrowed only for the call. Successful choke/steal records remain untouched, while terminated and newly allocated slot buffers are reset so stale per-voice lanes cannot leak across voice identities.

Member Typedef Documentation

◆ Owner

Constructor & Destructor Documentation

◆ VoiceRuntimeFacade()

pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::VoiceRuntimeFacade ( Owner & owner)
inlineexplicitnoexcept

Member Function Documentation

◆ active_voice_count()

std::uint32_t pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::active_voice_count ( ) const
inlinenoexcept

◆ allocated_voice_count()

std::uint32_t pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::allocated_voice_count ( ) const
inlinenoexcept

◆ finish_voice()

bool pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::finish_voice ( std::uint32_t voice_index,
std::span< VoiceModulationBuffer > modulation )
inlinenodiscardnoexcept

◆ mix()

VoiceSumResult pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::mix ( std::span< const VoiceSumInput > inputs,
BufferView< float > destination,
std::uint64_t frames,
const VoiceSumOptions & options = {} ) const
inlinenoexcept

◆ owner() [1/2]

const Owner & pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::owner ( ) const
inlinenoexcept

◆ owner() [2/2]

◆ release_note()

std::uint32_t pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::release_note ( int note,
std::uint32_t sample_id = kInvalidSampleId )
inlinenodiscardnoexcept

◆ release_voice()

bool pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::release_voice ( std::uint32_t voice_index)
inlinenodiscardnoexcept

◆ reset()

◆ set_steal_policy()

bool pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::set_steal_policy ( VoiceStealPolicy policy)
inlinenodiscardnoexcept

◆ set_termination_fade_frames()

void pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::set_termination_fade_frames ( std::uint32_t frames)
inlinenoexcept

◆ steal_policy()

◆ trigger()

AllocatedVoiceRuntimeTriggerResult pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::trigger ( const InstrumentVoiceTrigger & trigger,
std::span< VoiceTermination > terminations,
std::span< VoiceModulationBuffer > modulation )
inlinenodiscardnoexcept

◆ voice_count()

std::uint32_t pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::voice_count ( ) const
inlinenoexcept

◆ voices()

std::span< const InstrumentVoice > pulp::audio::VoiceRuntimeFacade< InstrumentVoiceAllocator >::voices ( ) const
inlinenoexcept

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