Function beep

Source
pub fn beep(hertz: u16) -> Result<()>
Expand description

Beeps the PC speaker at the given frequency

§Examples

use beep_evdev::beep;
use std::{thread, time};

beep(440).expect("could not beep");
thread::sleep(time::Duration::from_millis(500));
beep(880).expect("could not beep");
thread::sleep(time::Duration::from_millis(500));
beep(0).expect("could not beep");

§Errors

Returns std::io::Error on I/O errors