Skip to content

audio: voices and music controls for a Web Audio layer - #178

Merged
proggeramlug merged 1 commit into
codex/rendering-wip-integrated-20260727from
feat/web-audio-voices
Nov 7, 2026
Merged

proggeramlug merged 1 commit into
codex/rendering-wip-integrated-20260727from
feat/web-audio-voices

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

What @bloomengine/web needs to run a page's Web Audio graph and <audio> elements on the mixer:

  • playSoundEx: a non-spatial play that returns a voice id, with volume, pitch and stereo pan from the first block; voiceSetPan steers it
  • setMusicLooping: a track can play once (isMusicPlaying turns false at its end) instead of always looping
  • playMusicFrom: start a track at an offset (a seek); streamed tracks decode and drop up to it on their worker
  • getMusicTimePlayed / getMusicTimeLength: playback position and length
  • music volume now ramps across a mix block like voice gains, so per-frame fades and crossfades don't zipper

FFI added on shared, web and watchOS (stubs) and in the manifest.

Tested:

  • cargo test --release --lib audio: 30 passed (5 new: voice volume, pan, play-once with time, seek, music ramp)
  • node tools/validate-ffi.js: 0 failures
  • cargo check --target wasm32-unknown-unknown (native/web)
  • tuichess 3D on macOS through @bloomengine/web: title and game music crossfade, effects play (5 started, 0 failed)

Based on codex/rendering-wip-integrated-20260727, so the diff is only this change.

🤖 Generated with Claude Code

What @bloomengine/web needs to run a page's Web Audio graph and <audio>
elements on the mixer:

- playSoundEx: a non-spatial play that returns a voice id, with volume,
  pitch and stereo pan from the first block; voiceSetPan to steer it
- setMusicLooping: a track can play once (isMusicPlaying turns false at
  its end) instead of always looping
- playMusicFrom: start a track at an offset (a seek); streamed tracks
  decode and drop up to it on their worker
- getMusicTimePlayed / getMusicTimeLength: playback position and length
- music volume now ramps across a mix block like voice gains, so
  per-frame fades and crossfades don't zipper

FFI added on shared, web and watchOS (stubs) and in the manifest;
validate-ffi passes. Tests for each in audio::tests.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@proggeramlug
proggeramlug marked this pull request as ready for review November 7, 2026 08:47
@proggeramlug
proggeramlug merged commit 61a9612 into codex/rendering-wip-integrated-20260727 Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant