diff --git a/scripty_audio_handler/src/events/voice_tick.rs b/scripty_audio_handler/src/events/voice_tick.rs index f8f760f..7c57dab 100644 --- a/scripty_audio_handler/src/events/voice_tick.rs +++ b/scripty_audio_handler/src/events/voice_tick.rs @@ -387,8 +387,8 @@ async fn handle_speakers(ssrc_state: Arc, metrics: Arc, voice .inc_by((audio.len() * SIZE_OF_I16) as _); // incredibly useful for figuring out whether we're logging empty audio streams - let rms = ((audio.iter().map(|x| x.pow(2) as i32).sum::() as f64) - / audio.len() as f64) + let rms = ((audio.iter().map(|x| x.pow(2) as i64).sum::() / audio.len() as i64) + as f64) .sqrt(); trace!(%ssrc, "RMS of audio stream: {}", rms);