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

#6 in #tone

Download history 11/week @ 2024-07-19 62/week @ 2024-07-26 28/week @ 2024-08-02 21/week @ 2024-08-09 13/week @ 2024-08-16 13/week @ 2024-08-23 30/week @ 2024-08-30 82/week @ 2024-09-06 19/week @ 2024-09-13 32/week @ 2024-09-20 33/week @ 2024-09-27 17/week @ 2024-10-04 20/week @ 2024-10-11 15/week @ 2024-10-18 12/week @ 2024-10-25 15/week @ 2024-11-01

63 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