Skip to main content

Crate sim_lib_stream_alsa

Crate sim_lib_stream_alsa 

Source
Expand description

Modeled ALSA stream-host adapter (in-process simulation).

Modeled tier, no native I/O. This crate is a pure-Rust, in-process MODEL of an ALSA backend, not a binding to libasound. The workspace forbids unsafe and the crate carries no -sys/FFI dependency, so it performs no real Linux PCM I/O – it serves deterministic, provider-reported fake devices. The modeled tier is flagged by the default-on model feature; a native provider would live behind a separate FFI binding outside this repo.

This crate keeps validation independent of an ALSA development package or local sound hardware. It models provider-reported ALSA PCM devices, supports default, hw:*, and plughw:* names, exposes host inventory/open plans, bridges playback callbacks into ProcessBlock, and records capture buffers as PCM stream packets. A future native provider can populate the same model from snd_pcm_* enumeration. ALSA sequencer MIDI is intentionally left as a follow-up for a MIDI-specific adapter so this crate remains focused on PCM.

Structs§

AlsaBackend
ALSA host backend with provider-supplied deterministic PCM devices.
AlsaCaptureBridge
Converts ALSA capture buffers into PCM stream packets.
AlsaLib
Host-registered lib exporting the ALSA stream-host cards, built on the shared SurfacePackLib substrate.
AlsaPcmDevice
SIM-visible ALSA PCM device metadata.
AlsaPcmName
Parsed ALSA PCM name accepted by this adapter.
AlsaPlaybackBridge
Drives an audio graph processor from an ALSA playback callback.

Enums§

AlsaPcmNameKind
Supported ALSA PCM name family.

Functions§

alsa_backend_symbol
Returns the backend identity symbol stream/host:alsa.
alsa_transport_symbol
Returns the transport identity symbol stream/transport:alsa.
default_modeled_alsa_site
Builds the default modeled ALSA playback site.
install_stream_alsa_lib
Installs the AlsaLib into cx, idempotently.