1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! A library for interacting with audio devices.
//!
//! This is intended to provide both blocking and non-blocking idiomatic audio
//! drivers for all tier 1 platforms and systems (see list below).
//!
//! The sole aim of this crate is to provide idiomatic *low level* audio
//! interface drivers that can be used independently of the larger system. If
//! all you need is WASAPI or ALSA, then that is all you pay for and you should
//! have a decent Rust-idiomatic programming experience.
//!
//! This also makes use of the core traits provided by the [audio-core] crate.
//!
//! # Examples
//!
//! * [ALSA blocking playback][alsa-blocking].
//! * [WASAPI blocking playback][wasapi-blocking].
//! * [WASAPI async playback][wasapi-async].
//!
//! # Support
//!
//! Supported tier 1 platforms and systems are the following:
//!
//! | Platform | System | Blocking | Async   |
//! |----------|--------|----------|---------|
//! | Windows  | WASAPI | **wip**  | **wip** |
//! | Linux    | ALSA   | **wip**  | **wip** |
//!
//! [audio-core]: https://docs.rs/audio-core
//! [alsa-blocking]: https://github.com/udoprog/audio/blob/main/audio-device/examples/alsa.rs
//! [wasapi-blocking]: https://github.com/udoprog/audio/blob/main/audio-device/examples/wasapi.rs
//! [wasapi-async]: https://github.com/udoprog/audio/blob/main/audio-device/examples/wasapi-async.rs

#[macro_use]
#[doc(hidden)]
mod macros;

cfg_wasapi! {
    pub mod wasapi;
}

cfg_any_windows! {
    pub mod windows;
}

cfg_any_unix! {
    pub mod unix;
}

cfg_any_unix! {
    pub mod libc;
}

cfg_alsa! {
    pub mod alsa;
}

pub mod driver;

pub(crate) mod loom;