beep

Crates.iobeep
lib.rsbeep
version0.3.0
sourcesrc
created_at2017-08-27 15:53:15.612702
updated_at2021-03-29 17:01:08.852414
descriptionBeep the PC speaker
homepage
repositoryhttps://github.com/jswrenn/beep
max_upload_size
id29467
size4,587
Jack Wrenn (jswrenn)

documentation

README

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);
}
Commit count: 11

cargo fmt