Skip to content

Commit 7e7851d

Browse files
committed
[update] audio features to be enabled by default.
1 parent e179f7d commit 7e7851d

3 files changed

Lines changed: 25 additions & 20 deletions

File tree

crates/lambda-rs/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cargo-audit = "0.16.0"
2020
mockall = "0.14.0"
2121

2222
[features]
23-
default=["with-wgpu"]
23+
default=["with-wgpu", "audio"]
2424
with-vulkan=["with-wgpu", "lambda-rs-platform/wgpu-with-vulkan"]
2525
with-opengl=["with-wgpu", "lambda-rs-platform/wgpu-with-gl"]
2626
with-dx11=["with-wgpu"]
@@ -34,10 +34,10 @@ with-wgpu-gl=["with-wgpu", "lambda-rs-platform/wgpu-with-gl"]
3434

3535
# ---------------------------------- AUDIO ------------------------------------
3636

37-
# Umbrella features (disabled by default)
37+
# Umbrella features
3838
audio = ["audio-output-device"]
3939

40-
# Granular feature flags (disabled by default)
40+
# Granular feature flags
4141
audio-output-device = ["lambda-rs-platform/audio-device"]
4242

4343
# ------------------------------ RENDER VALIDATION -----------------------------

docs/features.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: "Cargo Features Overview"
33
document_id: "features-2025-11-17"
44
status: "living"
55
created: "2025-11-17T23:59:00Z"
6-
last_updated: "2026-01-30T22:10:39Z"
7-
version: "0.1.7"
6+
last_updated: "2026-01-30T22:48:05Z"
7+
version: "0.1.9"
88
engine_workspace_version: "2023.1.30"
99
wgpu_version: "26.0.1"
1010
shader_backend_default: "naga"
1111
winit_version: "0.29.10"
12-
repo_commit: "939c07cf5c7ff583559c60ea7bb571961579f12b"
12+
repo_commit: "e179f7de3b43f9cd822b4f7ab520c095dc3c6911"
1313
owners: ["lambda-sh"]
1414
reviewers: ["engine", "rendering"]
1515
tags: ["guide", "features", "validation", "cargo", "audio"]
@@ -31,8 +31,8 @@ relationships, and expected behavior in debug and release builds.
3131
- Workspace defaults prefer `wgpu` on supported platforms and `naga` for shader compilation.
3232
- Debug builds enable all validations unconditionally via `debug_assertions`.
3333
- Release builds enable only cheap safety checks by default; validation logs and per-draw checks MUST be enabled explicitly via features.
34-
- Audio features are disabled by default and incur runtime cost only when an
35-
audio device is initialized and kept alive.
34+
- Audio support in `lambda-rs` is enabled by default and incurs runtime cost
35+
only when an audio device is initialized and kept alive.
3636

3737
## lambda-rs
3838

@@ -56,9 +56,9 @@ Rendering backends
5656
- `with-dx11`: alias for `with-wgpu`.
5757

5858
Audio
59-
- `audio` (umbrella, disabled by default): enables audio support by composing
59+
- `audio` (umbrella, enabled by default): enables audio support by composing
6060
granular audio features. This umbrella includes `audio-output-device`.
61-
- `audio-output-device` (granular, disabled by default): enables audio output
61+
- `audio-output-device` (granular, enabled by default): enables audio output
6262
device enumeration and callback-based audio output via `lambda::audio`. This
6363
feature enables `lambda-rs-platform/audio-device` internally. Expected
6464
runtime cost is proportional to the output callback workload and buffer size;
@@ -132,6 +132,10 @@ Audio
132132
backend module `lambda_platform::cpal` backed by `cpal =0.17.1`.
133133

134134
## Changelog
135+
- 0.1.9 (2026-01-30): Clarify workspace default audio behavior after enabling
136+
`lambda-rs` audio features by default.
137+
- 0.1.8 (2026-01-30): Enable `lambda-rs` audio features by default and update
138+
audio feature defaults in documentation.
135139
- 0.1.7 (2026-01-30): Group features by crate and document audio feature flags.
136140
- 0.1.6 (2026-01-25): Remove the deprecated legacy shader backend
137141
documentation.

docs/specs/audio-devices.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: "Audio Device Abstraction"
33
document_id: "audio-device-abstraction-2026-01-28"
44
status: "draft"
55
created: "2026-01-28T22:59:00Z"
6-
last_updated: "2026-01-29T21:58:43Z"
7-
version: "0.1.9"
6+
last_updated: "2026-01-30T22:15:27Z"
7+
version: "0.1.10"
88
engine_workspace_version: "2023.1.30"
99
wgpu_version: "26.0.1"
1010
shader_backend_default: "naga"
1111
winit_version: "0.29.10"
12-
repo_commit: "e8944565ebba497ec59a72bdfdb855a97f41a666"
12+
repo_commit: "e179f7de3b43f9cd822b4f7ab520c095dc3c6911"
1313
owners: ["lambda-sh"]
1414
reviewers: ["engine", "rendering"]
1515
tags: ["spec", "audio", "lambda-rs", "platform", "cpal"]
@@ -324,10 +324,10 @@ Implementation rules
324324

325325
Features
326326

327-
- `lambda-rs` granular feature: `audio-output-device` (default: disabled)
327+
- `lambda-rs` granular feature: `audio-output-device` (default: enabled)
328328
- Enables the `lambda-rs::audio` output device surface.
329329
- Enables `lambda-rs-platform` `audio-device` internally.
330-
- `lambda-rs` umbrella feature: `audio` (default: disabled)
330+
- `lambda-rs` umbrella feature: `audio` (default: enabled)
331331
- Composes `audio-output-device` only.
332332

333333
### Application Interaction
@@ -520,10 +520,10 @@ Validation rules
520520
Features introduced by this spec
521521

522522
- Crate: `lambda-rs`
523-
- Granular feature: `audio-output-device` (default: disabled)
523+
- Granular feature: `audio-output-device` (default: enabled)
524524
- Enables `lambda-rs::audio` output device APIs.
525525
- Enables `lambda-rs-platform` `audio-device` internally.
526-
- Umbrella feature: `audio` (default: disabled)
526+
- Umbrella feature: `audio` (default: enabled)
527527
- Composes `audio-output-device` only.
528528
- Crate: `lambda-rs-platform`
529529
- Granular feature: `audio-device` (default: disabled)
@@ -602,7 +602,7 @@ Example (lambda-rs facade)
602602
This example is the primary application-facing reference.
603603

604604
- Add `crates/lambda-rs/examples/audio_sine_wave.rs` (feature:
605-
`audio-output-device`) that:
605+
`audio-output-device`, enabled by default) that:
606606
- Prints `lambda_rs::audio::enumerate_output_devices()` output.
607607
- Builds the default output device via the facade builder and plays a
608608
deterministic 440 Hz tone for at least 2 seconds.
@@ -618,21 +618,22 @@ Unit tests (crate: `lambda-rs-platform`)
618618

619619
Commands
620620

621-
- `cargo test -p lambda-rs --features audio-output-device -- --nocapture`
621+
- `cargo test -p lambda-rs -- --nocapture`
622622
- `cargo test -p lambda-rs-platform --features audio-device -- --nocapture`
623623

624624
Manual checks
625625

626626
- Run the `lambda-rs` facade example and confirm audible playback for at least
627627
2 seconds.
628-
- `cargo run -p lambda-rs --example audio_sine_wave --features audio-output-device`
628+
- `cargo run -p lambda-rs --example audio_sine_wave`
629629

630630
## Compatibility and Migration
631631

632632
- None. No existing audio APIs exist in the workspace.
633633

634634
## Changelog
635635

636+
- 2026-01-30 (v0.1.10) — Enable `lambda-rs` audio features by default.
636637
- 2026-01-29 (v0.1.9) — Fix YAML front matter to use a single `version` field.
637638
- 2026-01-29 (v0.1.8) — Make the `lambda-rs` facade example the primary
638639
reference and remove the platform example requirement.

0 commit comments

Comments
 (0)