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

Download history 13/week @ 2024-03-25 72/week @ 2024-04-01 25/week @ 2024-04-08 36/week @ 2024-04-15 47/week @ 2024-04-22 31/week @ 2024-04-29 30/week @ 2024-05-06 40/week @ 2024-05-13 41/week @ 2024-05-20 34/week @ 2024-05-27 36/week @ 2024-06-03 20/week @ 2024-06-10 22/week @ 2024-06-17 27/week @ 2024-06-24 9/week @ 2024-07-01 14/week @ 2024-07-08

76 downloads per month
Used in startrust

MIT license

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