diff --git a/src/driver/decode_mode.rs b/src/driver/decode_mode.rs index c4cef9736..8b8976e0a 100644 --- a/src/driver/decode_mode.rs +++ b/src/driver/decode_mode.rs @@ -35,7 +35,7 @@ pub enum Channels { Mono, /// Decode received audio packets into two interleaved channels. /// - /// Received mono packets will automatically be duplicated across + /// Received mono packets' samples will automatically be duplicated across /// both channels. /// /// The default choice. @@ -44,7 +44,7 @@ pub enum Channels { } impl Channels { - pub(crate) fn n_channels(self) -> usize { + pub(crate) fn channels(self) -> usize { match self { Channels::Mono => 1, Channels::Stereo => 2, @@ -69,7 +69,7 @@ pub enum SampleRate { Hz8000, /// Decode to a sample rate of 12kHz. Hz12000, - /// Decode to a sample rate of 46kHz. + /// Decode to a sample rate of 16kHz. Hz16000, /// Decode to a sample rate of 24kHz. Hz24000, diff --git a/src/driver/tasks/udp_rx/ssrc_state.rs b/src/driver/tasks/udp_rx/ssrc_state.rs index bfc10d536..87b6f1b88 100644 --- a/src/driver/tasks/udp_rx/ssrc_state.rs +++ b/src/driver/tasks/udp_rx/ssrc_state.rs @@ -173,7 +173,7 @@ impl SsrcState { Ok(audio_len) => { // Decoding to stereo: audio_len refers to sample count irrespective of channel count. // => multiply by number of channels. - out.truncate(self.channels.n_channels() * audio_len); + out.truncate(self.channels.channels() * audio_len); break; },