MCPcopy Create free account
hub / github.com/PerroEngine/Perro / compression_ratio

Method compression_ratio

perro_source/audio_stack/perro_pawdio/src/mic.rs:177–180  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

175 if bytes.len() < PMIC_COMPRESSED_HEADER_LEN {
176 return Err("mic clip v2 too small".to_string());
177 }
178 let channels = u16::from_le_bytes([bytes[6], bytes[7]]);
179 let sample_rate = u32::from_le_bytes([bytes[8], bytes[9], bytes[10], bytes[11]]);
180 let frames = u32::from_le_bytes([bytes[12], bytes[13], bytes[14], bytes[15]]) as usize;
181 let codec = bytes[16];
182 let expected_samples = checked_sample_len(frames, channels)?;
183 let payload = &bytes[PMIC_COMPRESSED_HEADER_LEN..];

Callers

nothing calls this directly

Calls 3

raw_byte_lenMethod · 0.80
maxMethod · 0.45
byte_lenMethod · 0.45

Tested by

no test coverage detected