hodaun 0.2.1

Audio IO and synthesis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use hodaun::*;

fn main() {
    // Initialize the output
    let mut output = OutputDeviceMixer::<Stereo>::with_default_device().unwrap();

    // Pan a sine wave back and forth at a frequency of 0.5 Hz
    output.add(
        SineWave::new(261.63)
            .amplify(0.5)
            .pan(SineWave::new(0.5))
            .take(5),
    );

    // Play
    output.play_blocking().unwrap();
}