pub fn calculate_rms(&self, channel: usize) -> f32 {
        let running_sums = self.running_sums.get();
        if channel >= running_sums.len() {
            return 0.0;
        }

        let sum = running_sums[channel].get().max(0.0);
        (sum / self.window.get().num_samples() as f32).sqrt()
    }
/// Calculate the RMS of the current window based on its running sum and size
Calculate the RMS of the current window based on its running sum and size
Calculate the RMS of the current window based on its running sum and size
pub fn calculate_rms(&self, channel: usize) -> f32 {
        let running_sums = self.running_sums.get();
        if channel >= running_sums.len() {
            return 0.0;
        }
        let sum = running_sums[channel].get().max(0.0);
        (sum / self.window.get().num_samples() as f32).sqrt()
    }
pub fn calculate_rms ( & self , channel : usize ) -> f32 { let running_sums = self . running_sums . get ( ) ; if channel >= running_sums . len ( ) { return 0.0 ; } let sum = running_sums [ channel ] . get ( ) . max ( 0.0 ) ; ( sum / self . window . get ( ) . num_samples ( ) as f32 ) . sqrt ( ) }
Calculate the RMS of the current window based on its running sum and size
Calculate the RMS of the current window based on its running sum and size
&self
channel
usize
&self
channel
usize