Struct envelope_detector::rms::Rms [] [src]

pub struct Rms<F> where
    F: Frame
{ /* fields omitted */ }

Iteratively extracts the RMS (root mean square) envelope from a window over a signal of sample Frames.

Methods

impl<F> Rms<F> where
    F: Frame
[src]

Construct a new Rms.

Zeroes the sum and the buffer of the window.

Set the size of the window as a number of frames.

If the current window length is longer than the given length, the difference will be popped from the front of the window while adjusting the sum accordingly.

If the current window length is shorter than the given length, the difference will be pushed to the front of the window using frames at signal equilibrium.

If the length already is already correct, no re-sizing occurs.

The length of the window as a number of frames.

The next RMS given the new frame in the sequence.

The Rms pops its front frame and adds the new frame to the back.

The yielded RMS is the RMS of all frame squares in the window after the new frame is added.

Returns Frame::equilibrium if the window is empty.

Trait Implementations

impl<F> Mode<F> for Rms<F> where
    F: Frame
[src]

Update state that is unique to the Mode.

impl<F: Clone> Clone for Rms<F> where
    F: Frame,
    F::Float: Clone,
    F::Float: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F> Debug for Rms<F> where
    F: Frame,
    F::Float: Debug
[src]

Formats the value using the given formatter.