Struct audiostream::synth::Tone
[-]
[+]
[src]
pub struct Tone<F, P> { // some fields omitted }
A pure tone.
The emitted signal is a full-scale (spans the entire range of the output type) sin wave, starting at zero.
The optional type parameter P
specifies the type in which the sin wave
will be generated. Some users may wish to use f64
for greater precision
in signals with long period, or other types according to the application's
required precision.
Methods
impl<F: Sample, P = f32> Tone<F, P>
fn new(size: usize, period: usize) -> Tone<F, P>
Create a pure tone generator with a specified period in samples for
buffers of size
samples.