-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
audioAll things related to audioAll things related to audioenhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappers
Description
Overview
Add platform-layer audio device abstraction that enumerates available audio
output devices and initializes a default playback device. This is the
foundational building block for all audio functionality.
Current State
No audio support exists in lambda-rs or lambda-rs-platform. The engine cannot
produce any sound output.
Scope
Enumerate available audio output devices on the system
- Initialize a default audio output device
- Provide
AudioDeviceBuilderfollowing existing builder patterns - Abstract platform audio via
lambda-rs-platform
Non-Goals:
- Audio input/recording
- Sound playback
- Audio effects processing
Proposed API
// crates/lambda-rs-platform/src/audio/device.rs
pub struct AudioDevice { /* platform handle */ }
pub struct AudioDeviceBuilder {
sample_rate: Option<u32>,
channels: Option<u16>,
label: Option<String>,
}
impl AudioDeviceBuilder {
pub fn new() -> Self;
pub fn with_sample_rate(self, rate: u32) -> Self;
pub fn with_channels(self, channels: u16) -> Self;
pub fn with_label(self, label: &str) -> Self;
pub fn build(self) -> Result<AudioDevice, AudioError>;
}
pub fn enumerate_devices() -> Vec<AudioDeviceInfo>;Acceptance Criteria
-
AudioDeviceBuildercreates a working audio output device -
enumerate_devices()returns available system audio devices - Works on Windows, macOS, and Linux
- Error handling for device initialization failures
- Unit tests for builder configuration
Affected Crates
lambda-rs-platform
Notes
- Consider wrapping
cpalfor cross-platform audio device access - Sample rate defaults: 44100 or 48000 Hz
- Channel defaults: stereo (2 channels)
Metadata
Metadata
Assignees
Labels
audioAll things related to audioAll things related to audioenhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappers