Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::ProcessingSwitchCrossfadeT< SampleType > Class Template Reference

The audio-thread state of one switch. More...

#include <processing_switch_crossfade.hpp>

Public Member Functions

void begin (const ProcessingSwitchPlan &plan) noexcept
void cancel () noexcept
bool active () const noexcept
bool finished () const noexcept
bool warming () const noexcept
std::int64_t position () const noexcept
const ProcessingSwitchPlan & plan () const noexcept
void mix (SampleType *const *output, const SampleType *const *incoming, int channels, int num_samples) noexcept
 Blend num_samples of the outgoing output (in output) with the incoming output, in place, and advance.

Detailed Description

template<typename SampleType = float>
class pulp::signal::ProcessingSwitchCrossfadeT< SampleType >

The audio-thread state of one switch.

Allocation-free and lock-free.

While active(), the caller runs BOTH realisations on the same input — the outgoing one into output, the incoming one into a buffer of its own — and calls mix(), which leaves the heard result in output. Once finished() the caller drops the outgoing realisation and runs the incoming one alone; mix() has by then already been returning the incoming output exactly.

Member Function Documentation

◆ active()

template<typename SampleType = float>
bool pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::active ( ) const
inlinenodiscardnoexcept

◆ begin()

template<typename SampleType = float>
void pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::begin ( const ProcessingSwitchPlan & plan)
inlinenoexcept

◆ cancel()

template<typename SampleType = float>
void pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::cancel ( )
inlinenoexcept

◆ finished()

template<typename SampleType = float>
bool pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::finished ( ) const
inlinenodiscardnoexcept

◆ mix()

template<typename SampleType = float>
void pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::mix ( SampleType *const * output,
const SampleType *const * incoming,
int channels,
int num_samples )
inlinenoexcept

Blend num_samples of the outgoing output (in output) with the incoming output, in place, and advance.

While warming output is left untouched; past the fade it becomes the incoming output exactly.

◆ plan()

template<typename SampleType = float>
const ProcessingSwitchPlan & pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::plan ( ) const
inlinenodiscardnoexcept

◆ position()

template<typename SampleType = float>
std::int64_t pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::position ( ) const
inlinenodiscardnoexcept

◆ warming()

template<typename SampleType = float>
bool pulp::signal::ProcessingSwitchCrossfadeT< SampleType >::warming ( ) const
inlinenodiscardnoexcept

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