Crates.io | beep |
lib.rs | beep |
version | 0.3.0 |
source | src |
created_at | 2017-08-27 15:53:15.612702 |
updated_at | 2021-03-29 17:01:08.852414 |
description | Beep the PC speaker |
homepage | |
repository | https://github.com/jswrenn/beep |
max_upload_size | |
id | 29467 |
size | 4,587 |
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);
}