(&self)
| 171 | Self::try_new(samples, sample_rate, channels) |
| 172 | } |
| 173 | |
| 174 | fn unpack_v2(bytes: &[u8]) -> Result<Self, String> { |
| 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]]); |