Expand description
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!
Re-exports§
pub use crate::card::Card;
pub use crate::ctl::Ctl;
pub use crate::hctl::HCtl;
pub use crate::pcm::PCM;
pub use crate::rawmidi::Rawmidi;
pub use crate::poll::Descriptors as PollDescriptors;
pub use crate::mixer::Mixer;
pub use crate::seq::Seq;
Modules§
- card
- Sound card enumeration
- ctl
- Control device API
- device_
name - Enumerate devices in the alsa library configuration
- direct
- Functions that bypass alsa-lib and talk directly to the kernel.
- 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§
- Error
- ALSA error
- 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?