class Haematite::Ditherer
- Haematite::Ditherer
- Reference
- Object
Overview
The Ditherer class provides support for converting Float64 sound samples
to integer bit depths while also applying dithering for higher quality.
Defined in:
haematite/dither.crConstant Summary
-
INV_INT32_MAX =
1.0 / Int32::MAX.to_f64!
Instance Method Summary
-
#ditherSample(bitDepth : Int32, sample : Float64) : Int32
Converts a sample by dithering it to the target bit depth.
Instance Method Detail
def ditherSample(bitDepth : Int32, sample : Float64) : Int32
#
Converts a sample by dithering it to the target bit depth. Regardless of
the bit depth requested, the value is always returned as an Int32. The
value will still be within the requested bit depth.