pub fn packet_nb_samples( packet: &[u8], sample_rate: SampleRate, ) -> Result<usize>
Get total samples (per channel) in a packet at the given sample rate.
Returns an error if the packet cannot be parsed.