4 releases (2 breaking)
0.3.0 | Mar 29, 2021 |
---|---|
0.2.1 | Apr 12, 2018 |
0.2.0 | Apr 10, 2018 |
0.1.0 | Aug 27, 2017 |
#4 in #tone
76 downloads per month
Used in startrust
3KB
beep.rs
Play an indefinite tone of a given frequency
.
For instance:
extern crate beep;
extern crate dimensioned;
use std::{thread, time};
use beep::beep;
use dimensioned::si;
fn main() {
beep(440. * si::HZ);
thread::sleep(time::Duration::from_millis(500));
beep(si::Hertz::new(880));
thread::sleep(time::Duration::from_millis(500));
beep(0. * si::HZ);
}
Dependencies
~1.5MB
~37K SLoC