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

Stateful deterministic wrapper for per-sample and block processing. More...

#include <dither.hpp>

Public Member Functions

void set_bits (SampleType bits) noexcept
void set_dither_mode (DitherMode mode) noexcept
void set_noise_shaping (NoiseShapingOrder order) noexcept
void set_seed (std::uint32_t seed) noexcept
void sync_configuration_from (const DitherQuantizerT &other) noexcept
 Copy policy and reset seed without copying another instance's live error memory or random-stream position.
void reset () noexcept
SampleType process (SampleType input) noexcept
void process (SampleType *samples, int count) noexcept
SampleType bits () const noexcept
DitherMode dither_mode () const noexcept
NoiseShapingOrder noise_shaping () const noexcept
const NoiseShaperStateT< SampleType > & state () const noexcept
std::uint32_t rng_state () const noexcept
std::uint32_t seed () const noexcept

Static Public Member Functions

static constexpr int latency_samples () noexcept

Static Public Attributes

static constexpr std::uint32_t default_seed = 0x2C1B3A5Du

Detailed Description

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

Stateful deterministic wrapper for per-sample and block processing.

RT contract: all state is fixed-size scalar storage. process, reset, and every setter allocate nothing, take no locks, and do not throw. The random stream advances only when TPDF is enabled and the quantizer is active.

Member Function Documentation

◆ bits()

template<typename SampleType = float>
SampleType pulp::signal::DitherQuantizerT< SampleType >::bits ( ) const
inlinenoexcept

◆ dither_mode()

template<typename SampleType = float>
DitherMode pulp::signal::DitherQuantizerT< SampleType >::dither_mode ( ) const
inlinenoexcept

◆ latency_samples()

template<typename SampleType = float>
constexpr int pulp::signal::DitherQuantizerT< SampleType >::latency_samples ( )
inlinestaticconstexprnoexcept

◆ noise_shaping()

template<typename SampleType = float>
NoiseShapingOrder pulp::signal::DitherQuantizerT< SampleType >::noise_shaping ( ) const
inlinenoexcept

◆ process() [1/2]

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::process ( SampleType * samples,
int count )
inlinenoexcept

◆ process() [2/2]

template<typename SampleType = float>
SampleType pulp::signal::DitherQuantizerT< SampleType >::process ( SampleType input)
inlinenoexcept

◆ reset()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::reset ( )
inlinenoexcept

◆ rng_state()

template<typename SampleType = float>
std::uint32_t pulp::signal::DitherQuantizerT< SampleType >::rng_state ( ) const
inlinenoexcept

◆ seed()

template<typename SampleType = float>
std::uint32_t pulp::signal::DitherQuantizerT< SampleType >::seed ( ) const
inlinenoexcept

◆ set_bits()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::set_bits ( SampleType bits)
inlinenoexcept

◆ set_dither_mode()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::set_dither_mode ( DitherMode mode)
inlinenoexcept

◆ set_noise_shaping()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::set_noise_shaping ( NoiseShapingOrder order)
inlinenoexcept

◆ set_seed()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::set_seed ( std::uint32_t seed)
inlinenoexcept

◆ state()

template<typename SampleType = float>
const NoiseShaperStateT< SampleType > & pulp::signal::DitherQuantizerT< SampleType >::state ( ) const
inlinenoexcept

◆ sync_configuration_from()

template<typename SampleType = float>
void pulp::signal::DitherQuantizerT< SampleType >::sync_configuration_from ( const DitherQuantizerT< SampleType > & other)
inlinenoexcept

Copy policy and reset seed without copying another instance's live error memory or random-stream position.

Member Data Documentation

◆ default_seed

template<typename SampleType = float>
std::uint32_t pulp::signal::DitherQuantizerT< SampleType >::default_seed = 0x2C1B3A5Du
staticconstexpr

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/dither.hpp