-
Notifications
You must be signed in to change notification settings - Fork 2
feat(lambda-rs): Implement a SoundBuffer with support for decoding wav and ogg files.
#167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vmarcella
wants to merge
23
commits into
main
Choose a base branch
from
vmarcella/wav-and-ogg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,830
−97
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Coverage Report📊 View Full HTML Report (download artifact) Overall Coverage
Changed Files in This PR
PR Files Coverage: 51.63% (807/1563 lines) Generated by cargo-llvm-cov · Latest main coverage Last updated: 2026-02-03 22:47:34 UTC · Commit: |
…eed new separate demo crates long term)
…Will fix in a later PR).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
audio
All things related to audio
lambda-rs
Issues pertaining to the core framework
lambda-rs-platform
Issues pertaining to the dependency & platform wrappers
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Related Issues
Changes
Add Symphonia wrapper in
lambda-rs-platformfor WAV and OGG Vorbis decodingaudio-decode-wav,audio-decode-vorbis,audio-sound-buffer)AudioError) with decode-specific variantssound_buffer_loadexample demonstrating the loading APIplay_slash_soundexample demonstrating playback integrationlambda_audiotool for testing audio loading and playbackdocs/features.mdwith new audio feature documentationdocs/specs/audio-file-loading.mdspecificationType of Change
Affected Crates
lambda-rslambda-rs-platformlambda-rs-argslambda-rs-loggingtools/lambda_audioChecklist
cargo +nightly fmt --all)cargo clippy --workspace --all-targets -- -D warnings)cargo test --workspace)Testing
Commands run:
Manual verification steps (if applicable):
play_slash_soundexamplelambda_audiotool can load and play audio filesScreenshots/Recordings
Platform Testing
Additional Notes
Feature Flag Structure
The new audio features follow the existing feature flag patterns:
lambda-rs:
audio-sound-buffer-wav- WAV file loadingaudio-sound-buffer-vorbis- OGG Vorbis loadingaudio-sound-buffer- Umbrella for all sound buffer featuresaudio- Updated umbrella including output device and sound bufferlambda-rs-platform:
audio-decode-wav- Symphonia WAV decoderaudio-decode-vorbis- Symphonia Vorbis decoderSupported Formats
WAV:
OGG Vorbis:
API Design
The
SoundBuffertype provides:samples()- Access to interleaved f32 PCM datasample_rate()- Audio sample ratechannels()- Number of audio channelsduration_seconds()- Computed durationframe_count()- Number of audio framesAll decoding errors are mapped to
AudioErrorvariants without exposing Symphonia internals.