Function alaw_compress
Source pub fn alaw_compress(sample: i16) -> u8
Expand description
A-law compression according to ITU-T G.711
Compresses a 16-bit linear PCM sample to 8-bit A-law encoding.
§Arguments
sample - Input linear PCM sample (16-bit signed)
§Returns
A-law encoded sample (8-bit)
§Algorithm
Based on ITU-T G.711 specification and reference implementation.