Voice 5: fluxer-audio clips and chimes #66

Closed
opened 2026-11-11 12:17:33 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-audio/src/{clip.rs,chime.rs}, crates/fluxer-audio/assets/sounds/* (copied from the fork's sound assets listed in facts §1 "Join and leave chimes", with the fork's licence note in the crate README)
  • Modify: workspace Cargo.toml (symphonia with mp3, ogg/vorbis, aac/isomp4, wav), engine.rs
  • Test: crates/fluxer-audio/tests/clips.rs

Interfaces:

  • Produces: clip::decode(bytes: &[u8], content_type: Option<&str>) -> Result<Clip, ClipError> (48 kHz stereo, rejects > 30 s and > 20 MiB); ClipCache::new(32) keyed by string; Chime::{UserJoin, UserLeave, Mute, Unmute, Deafen, Undeafen, VoiceDisconnect, ViewerJoin, ViewerLeave, IncomingCall}; AudioEngine::play_clip(key: &str, bytes: Option<Bytes>, gain: f32, tag: u64) -> Result<Duration, ClipError> (bytes omitted when cached), play_chime(Chime, gain), stop_clips(); EngineEvent::ClipFinished { tag }.

  • Step 1: Write failing tests: decodes_mp3_ogg_m4a_wav_fixtures_to_48k_stereo, rejects_overlong_clip, cache_evicts_least_recently_used_at_33, play_clip_mixes_into_output_and_reports_finished, every_chime_asset_decodes.

  • Step 2–5: FAIL → implement → PASS → commit feat(audio): clip decoding, cache and chimes.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md

**Files:** - Create: `crates/fluxer-audio/src/{clip.rs,chime.rs}`, `crates/fluxer-audio/assets/sounds/*` (copied from the fork's sound assets listed in facts §1 "Join and leave chimes", with the fork's licence note in the crate README) - Modify: workspace `Cargo.toml` (`symphonia` with mp3, ogg/vorbis, aac/isomp4, wav), `engine.rs` - Test: `crates/fluxer-audio/tests/clips.rs` **Interfaces:** - Produces: `clip::decode(bytes: &[u8], content_type: Option<&str>) -> Result<Clip, ClipError>` (48 kHz stereo, rejects > 30 s and > 20 MiB); `ClipCache::new(32)` keyed by string; `Chime::{UserJoin, UserLeave, Mute, Unmute, Deafen, Undeafen, VoiceDisconnect, ViewerJoin, ViewerLeave, IncomingCall}`; `AudioEngine::play_clip(key: &str, bytes: Option<Bytes>, gain: f32, tag: u64) -> Result<Duration, ClipError>` (bytes omitted when cached), `play_chime(Chime, gain)`, `stop_clips()`; `EngineEvent::ClipFinished { tag }`. - [ ] **Step 1: Write failing tests**: `decodes_mp3_ogg_m4a_wav_fixtures_to_48k_stereo`, `rejects_overlong_clip`, `cache_evicts_least_recently_used_at_33`, `play_clip_mixes_into_output_and_reports_finished`, `every_chime_asset_decodes`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(audio): clip decoding, cache and chimes`. Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md
charles added this to the Voice milestone 2026-11-11 12:17:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#66
No description provided.