actually_beep 0.1.1

A cross platform library to provides easy to use beep functions that actually beep
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use cpal::{SampleFormat, HostId};
use thiserror::Error;
/// The `actually_beep` Error type
#[derive(Debug, Error)]
pub enum Error {
    #[error("Unsupported sample format '{0}'")]
    UnsupportedSampleFormat(SampleFormat),
    #[error("cpal error: {0}")]
    CpalError(Box<dyn std::error::Error>),
    #[error("An error occurred on stream: {0}")]
    StreamError(cpal::StreamError),
    #[error("Failed to find output device \"{0}\"")]
    NoDevice(String),
    #[error("Host not found: {0:?}")]
    HostNotFound(HostId)
}
/// The `actually_beep` Result type
pub type Result<S> = std::result::Result<S, Error>;