aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-06-15 13:25:16 +0200
committerGustav Sörnäs <gustav@sornas.net>2021-06-15 13:25:16 +0200
commitb97645143c70b8c69d659e46e5d0cfce97220b44 (patch)
treeed2a9170a9baa9dfdd8a66c16d47f80052608de4
parentbc270b506270a17fe830cc1a41426708fedcbdb6 (diff)
downloadmum-b97645143c70b8c69d659e46e5d0cfce97220b44.tar.gz
saturating add method doc
-rw-r--r--mumd/src/audio/output.rs3
1 files changed, 2 insertions, 1 deletions
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;
}