Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jswrenn/beep
Beep the PC speaker
https://github.com/jswrenn/beep
Last synced: 2 months ago
JSON representation
Beep the PC speaker
- Host: GitHub
- URL: https://github.com/jswrenn/beep
- Owner: jswrenn
- Created: 2017-08-27T15:49:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T06:11:45.000Z (about 2 years ago)
- Last Synced: 2024-10-14T16:47:10.833Z (3 months ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# beep.rs
Play an indefinite tone of a given `frequency`.
For instance:
```rust
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);
}
```