From b97645143c70b8c69d659e46e5d0cfce97220b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 15 Jun 2021 13:25:16 +0200 Subject: saturating add method doc --- mumd/src/audio/output.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mumd/src/audio') diff --git a/mumd/src/audio/output.rs b/mumd/src/audio/output.rs index 3d886d6..3c00116 100644 --- a/mumd/src/audio/output.rs +++ b/mumd/src/audio/output.rs @@ -1,4 +1,5 @@ //! Receives audio packets from the networking and plays them. + use crate::audio::SAMPLE_RATE; use crate::error::{AudioError, AudioStream}; use crate::network::VoiceStreamType; @@ -79,8 +80,8 @@ impl ClientStream { /// Since we support [f32], [i16] and [u16] we need some way of adding two values /// without peaking above/below the edge values. This trait ensures that we can /// use all three primitive types as a generic parameter. - pub trait SaturatingAdd { + /// Adds two values in some saturating way. See trait documentation. fn saturating_add(self, rhs: Self) -> Self; } -- cgit v1.2.1