Struct volume::Volume [] [src]

pub struct Volume {
    pub current: f32,
    pub interpolation_ms: Ms,
    // some fields omitted
}

A simple dsp node for multiplying the amplitude of its inputs by the held multiplier.

Fields

current: f32 interpolation_ms: Ms

Methods

impl Volume
[src]

fn new() -> Volume

Constructor for a new default volume. The default volume is 1.0, having no impact on the input signal. The default interpolation_ms is 10ms to avoid clipping.

fn volume(self, volume: f32) -> Volume

Builder for constructing a Volume with some given volume.

fn interpolation_ms(self, ms: Ms) -> Volume

Builder for constructing a Volume with some given interpolation length in Ms. The interpolation length is how long it takes the volume to progress from some previous volume to a new current volume. It is mainly used to avoid clipping.

The default interpolation_ms is 10ms - just enough to avoid clipping.

fn set(&mut self, volume: f32)

Set the new current volume.

Trait Implementations

impl Debug for Volume
[src]

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

Formats the value using the given formatter.

impl Clone for Volume
[src]

fn clone(&self) -> Volume

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 Copy for Volume
[src]

impl<S> Node<S> for Volume where S: Sample
[src]

fn audio_requested(&mut self, buffer: &mut [S], settings: Settings)

Request audio from the Node given some stream format Settings. If the Node has no inputs, the buffer will be zeroed. If the Node has some inputs, the buffer will consist of the inputs summed together. Read more

fn dry(&self) -> f32

Following the call to the Node's audio_requested method, the Graph will sum together some of the original (dry) signal with some of the processed (wet) signal. Read more

fn wet(&self) -> f32

Following the call to the Node's audio_requested method, the Graph will sum together some of the original (dry) signal with some of the processed (wet) signal. Read more