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

Function write_varint

perro_source/audio_stack/perro_pawdio/src/mic.rs:324–330  ·  view source on GitHub ↗
(mut value: u16, out: &mut Vec<u8>)

Source from the content-addressed store, hash-verified

322 sample_rate: u32,
323 frames: u32,
324 payload: &[u8],
325) {
326 let mut packed = Vec::with_capacity(PMIC_COMPRESSED_HEADER_LEN + payload.len());
327 packed.extend_from_slice(PMIC_MAGIC);
328 packed.extend_from_slice(&PMIC_VERSION_COMPRESSED.to_le_bytes());
329 packed.extend_from_slice(&channels.to_le_bytes());
330 packed.extend_from_slice(&sample_rate.to_le_bytes());
331 packed.extend_from_slice(&frames.to_le_bytes());
332 packed.push(codec);
333 packed.extend_from_slice(&[0, 0, 0]);

Callers 1

delta_payloadFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected