Skip to content

Struct audio_dithering_state

struct audio_dithering_state audio

struct audio_dithering_state { … }

Represents the state of audio dithering.

Holds the dithering method, amplitude scale, and a random number generator used to produce dither noise during sample quantization.

variable dithering

audio_dithering dithering

Active dithering method.

Fully qualified name: kfr::audio_dithering_state::dithering

Declared at audio/data.hpp:982

variable scale

fbase scale

Amplitude scale applied to the generated noise.

Fully qualified name: kfr::audio_dithering_state::scale

Declared at audio/data.hpp:983

variable rnd

mutable std::mt19937_64 rnd{ std::random_device{}() }

Random number generator.

Fully qualified name: kfr::audio_dithering_state::rnd

Declared at audio/data.hpp:984

variable dist

mutable std::uniform_real_distribution<fbase> dist{
    fbase(-0.5), fbase(+0.5)
}

Fully qualified name: kfr::audio_dithering_state::dist

Declared at audio/data.hpp:985

function operator()()

fbase operator()() const

Generates one dither sample according to the configured method.

Returns
A dither noise value scaled by scale ; zero for audio_dithering::none.

Fully qualified name: kfr::audio_dithering_state::operator()()

Declared at audio/data.hpp:992

Fully qualified name: kfr::audio_dithering_state

Declared at audio/data.hpp:980

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.