Skip to content

Comments

feat: implement MCMP fadein/fadeout support#27

Merged
ctoth merged 1 commit intomasterfrom
fix/mcmp-fade
Feb 19, 2026
Merged

feat: implement MCMP fadein/fadeout support#27
ctoth merged 1 commit intomasterfrom
fix/mcmp-fade

Conversation

@daiverd
Copy link
Contributor

@daiverd daiverd commented Feb 19, 2026

Summary

  • Implement fadein: volume ramps from 0 to target over specified milliseconds
  • Implement fadeout: volume ramps from target to 0 at end of sound
  • Uses Web Audio API's linearRampToValueAtTime for smooth transitions
  • Only applies to sounds with known duration (buffered sounds, not streaming)

Test plan

  • Trigger sound with fadein (e.g., 2000ms) - verified gradual volume increase
  • Trigger sound with fadeout (e.g., 2000ms) - verified gradual volume decrease at end
  • All 133 tests passing

Uses Web Audio API's linearRampToValueAtTime for smooth volume transitions:
- Fadein: starts at 0, ramps to target volume over specified duration
- Fadeout: ramps from target volume to 0 at end of sound

Only applies to sounds with known duration (buffered, not streaming).
@ctoth ctoth merged commit 6c265fe into master Feb 19, 2026
1 check passed
@ctoth ctoth deleted the fix/mcmp-fade branch February 19, 2026 06:44
github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
Uses Web Audio API's linearRampToValueAtTime for smooth volume transitions:
- Fadein: starts at 0, ramps to target volume over specified duration
- Fadeout: ramps from target volume to 0 at end of sound

Only applies to sounds with known duration (buffered, not streaming).

Co-authored-by: David Sexton <daiverd@gmail.com> 6c265fe
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.

2 participants