Function sample::signal::gen
[−]
[src]
pub fn gen<G, F>(gen: G) -> Gen<G, F> where G: Fn() -> F, F: Frame
A signal that generates frames using the given function.
Example
extern crate sample; fn main() { let mut frames = sample::signal::gen(|| [0.5]); assert_eq!(frames.next(), Some([0.5])); assert_eq!(frames.next(), Some([0.5])); }