⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

fp_from_i16

Function fp_from_i16 

Source
pub fn fp_from_i16(sample: i16) -> FixedPoint
Expand description

Convert a signed 16-bit sample to fixed-point 16.16

Maps the full i16 range (-32768..32767) into fixed-point. Since an i16 fits in the integer portion of a 16.16 number, this is a simple shift.