Function sample::signal::equilibrium [] [src]

pub fn equilibrium<F>() -> Equilibrium<F> where F: Frame

Provides an iterator that endlessly yields Frames of type F at equilibrium.

Example

extern crate sample;

use sample::Signal;

fn main() {
    let equilibrium: Vec<[f32; 1]> = sample::signal::equilibrium().take(4).collect();
    assert_eq!(equilibrium, vec![[0.0], [0.0], [0.0], [0.0]]);

    let equilibrium: Vec<[u8; 2]> = sample::signal::equilibrium().take(3).collect();
    assert_eq!(equilibrium, vec![[128, 128], [128, 128], [128, 128]]);
}