Crate alsa [−] [src]
Thin but safe wrappers for ALSA.
This ALSA API wrapper/binding is WIP - the ALSA API is huge, and new functions and structs might be added as requested.
Most functions map 1-to-1 to alsa-lib functions, e g, ctl::CardInfo::get_id()
is a wrapper around
snd_ctl_card_info_get_id
and the alsa-lib documentation
can be consulted for additional information.
Enjoy!
Reexports
pub use card::Card; |
pub use hctl::HCtl; |
pub use pcm::PCM; |
pub use rawmidi::Rawmidi; |
pub use poll::PollDescriptors; |
pub use mixer::Mixer; |
pub use seq::Seq; |
Modules
card |
Sound card enumeration |
ctl |
Control device API |
device_name |
Enumerate devices in the alsa library configuration |
hctl |
HCtl API - for mixer control and jack detection |
mixer |
Mixer API - Simple Mixer API for mixer control |
pcm |
Audio playback and capture |
poll |
Tiny poll ffi |
rawmidi |
MIDI devices I/O and enumeration |
seq |
MIDI sequencer I/O and enumeration |
Structs
Ctl |
snd_ctl_t wrapper |
Error |
Most ALSA functions can return a negative error code.
If so, then that error code is wrapped into this |
Output |
snd_output_t wrapper |
Enums
Direction |
Replaces constants ending with PLAYBACK/CAPTURE as well as INPUT/OUTPUT |
Round |
Rounding mode (used in some mixer related calls) |
ValueOr |
Used to restrict hw parameters. In case the submitted value is unavailable, in which direction should one search for available values? |
Type Definitions
Result |