Struct envelope_detector::peak::Peak [] [src]

pub struct Peak<R = FullWave> {
    // some fields omitted
}

A peak rectifier, generic over FullWave, PositiveHalfWave and NegativeHalfWave rectification.

It produces a peak-following envelope when rectify is called over a signal of samples.

Methods

impl Peak<FullWave>
[src]

fn full_wave() -> Peak<FullWave>

A full-wave peak rectifier.

impl Peak<PositiveHalfWave>
[src]

fn positive_half_wave() -> Peak<PositiveHalfWave>

A positive half-wave peak rectifier.

impl Peak<NegativeHalfWave>
[src]

fn negative_half_wave() -> Peak<NegativeHalfWave>

A negative half-wave peak rectifier.

impl<R> Peak<R>
[src]

fn rectify(sample: f32) -> f32 where R: Rectifier

Return the rectified sample.

Trait Implementations

impl<R> Mode for Peak<R> where R: Rectifier
[src]

fn next_sample(&mut self, sample: f32) -> f32

Update state that is unique to the Mode.

impl<R: PartialEq> PartialEq for Peak<R>
[src]

fn eq(&self, __arg_0: &Peak<R>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Peak<R>) -> bool

This method tests for !=.

impl<R: Debug> Debug for Peak<R>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<R: Clone> Clone for Peak<R>
[src]

fn clone(&self) -> Peak<R>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<R: Copy> Copy for Peak<R>
[src]