audiopus::packet

Function nb_samples

Source
pub fn nb_samples<'a, I>(packet: I, sample_rate: SampleRate) -> Result<usize>
where I: TryInto<Packet<'a>>,
Expand description

Gets number of frames in an Opus packet.

Warning: Empty packet will return Error::EmptyPacket.