Skip to content

Commit 928d6e3

Browse files
authored
feat(lambda-rs): Add audio device enumeration & playback
2 parents 4912728 + a85dd98 commit 928d6e3

File tree

12 files changed

+2581
-23
lines changed

12 files changed

+2581
-23
lines changed

.github/workflows/compile_lambda_rs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,21 @@ jobs:
2323
- os: ubuntu-latest
2424
rustup-toolchain: "stable"
2525
features: "lambda-rs/with-vulkan"
26+
- os: ubuntu-latest
27+
rustup-toolchain: "stable"
28+
features: "lambda-rs/with-vulkan,lambda-rs/audio-output-device"
2629
- os: windows-latest
2730
rustup-toolchain: "stable"
2831
features: "lambda-rs/with-dx12"
32+
- os: windows-latest
33+
rustup-toolchain: "stable"
34+
features: "lambda-rs/with-dx12,lambda-rs/audio-output-device"
2935
- os: macos-latest
3036
rustup-toolchain: "stable"
3137
features: "lambda-rs/with-metal"
38+
- os: macos-latest
39+
rustup-toolchain: "stable"
40+
features: "lambda-rs/with-metal,lambda-rs/audio-output-device"
3241

3342
steps:
3443
- name: Checkout Repository
@@ -50,6 +59,13 @@ jobs:
5059
libwayland-dev libudev-dev \
5160
libvulkan-dev libvulkan1 mesa-vulkan-drivers vulkan-tools
5261
62+
- name: Install Linux deps for audio
63+
if: ${{ matrix.os == 'ubuntu-latest' && contains(matrix.features, 'lambda-rs/audio-output-device') }}
64+
run: |
65+
sudo apt-get update
66+
sudo apt-get install -y \
67+
libasound2-dev
68+
5369
- name: Configure Vulkan (Ubuntu)
5470
if: ${{ matrix.os == 'ubuntu-latest' }}
5571
run: |

Cargo.lock

Lines changed: 222 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/lambda-rs-platform/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ obj-rs = "=0.7.4"
2222
wgpu = { version = "=28.0.0", optional = true, features = ["wgsl", "spirv"] }
2323
pollster = { version = "=0.4.0", optional = true }
2424
lambda-rs-logging = { path = "../lambda-rs-logging", version = "2023.1.30" }
25+
cpal = { version = "=0.17.1", optional = true }
2526

2627
# Force windows crate to 0.62 to unify wgpu-hal and gpu-allocator dependencies.
2728
# Both crates support this version range, but Cargo may resolve to different
@@ -48,3 +49,11 @@ wgpu-with-vulkan = ["wgpu"]
4849
wgpu-with-metal = ["wgpu", "wgpu/metal"]
4950
wgpu-with-dx12 = ["wgpu", "wgpu/dx12"]
5051
wgpu-with-gl = ["wgpu", "wgpu/webgl"]
52+
53+
# ---------------------------------- AUDIO ------------------------------------
54+
55+
# Umbrella features (disabled by default)
56+
audio = ["audio-device"]
57+
58+
# Granular feature flags (disabled by default)
59+
audio-device = ["dep:cpal"]

0 commit comments

Comments
 (0)