Module audio_constants

Module audio_constants 

Source

Constants§

I16_MAX_F32
Maximum positive value for 16-bit signed integer (2^15 - 1)
I16_MAX_F64
Maximum absolute value for 16-bit signed integer as f64
I16_MIN_F32
Minimum value for 16-bit signed integer (-2^15)
I16_TO_F32_SCALE
Inverse of I16_MAX_F32, used for int→float conversion (1/32767)
I16_TO_F32_SCALE_ALT
Inverse of I16_MIN_F32 absolute value, used for alternate int→float (1/32768)

Functions§

f32_to_i16
Convert f32 sample to i16
f32_to_i32
Convert f32 sample to i32 for processing
i16_to_f32
Convert i16 sample to f32
i32_to_f32
Convert i32 sample to f32