Add audio manager with input and output device managers #39

Merged
puregarlic merged 2 commits from issue/34 into main 2026-02-19 14:07:36 -08:00
Owner

Adds an audio module that is responsible for handling input and output audio streams. Everything uses default devices and configurations by default, and the module has commands for starting/stopping audio loopback for testing purposes and as a usage example.

The code is based on the similar implementation for petite, but exhaustively handles signal precisions and doesn't include resampling to 16Khz. An agent was used to expand the output manager to have an API beyond returning just the output device, and add support for multiple output audio streams mixed and clamped to (hopefully) mitigate peaking.

Closes #34, #35

Adds an `audio` module that is responsible for handling input and output audio streams. Everything uses default devices and configurations by default, and the module has commands for starting/stopping audio loopback for testing purposes and as a usage example. The code is based on the similar implementation for `petite`, but exhaustively handles signal precisions and doesn't include resampling to 16Khz. An agent was used to expand the output manager to have an API beyond returning just the output device, and add support for multiple output audio streams mixed and clamped to (hopefully) mitigate peaking. Closes #34, #35
@ -0,0 +214,4 @@
// --- 2. Evict stopped / exhausted signals -----------------------
entries.retain_mut(|e| {
let keep = e.active.load(Ordering::Relaxed) && !e.signal.is_exhausted();
Collaborator

Do our signals get exhausted? The docs for this say that infinite signals will always return false

Do our signals get exhausted? The [docs](https://docs.rs/dasp_signal/latest/dasp_signal/trait.Signal.html#method.is_exhausted) for this say that infinite signals will always return false
tepichord marked this conversation as resolved
tepichord approved these changes 2026-02-19 14:02:38 -08:00
tepichord left a comment
Collaborator

LGTM

LGTM
Sign in to join this conversation.
No description provided.