Conversation
The volume sliders fed their linear 0-1 position straight to Howler as linear amplitude gain. Because perceived loudness is roughly logarithmic, the top ~80% of the slider sounded nearly identical and users had to drop to ~20% before noticing any change. Square the slider position into a perceptual gain in SoundManager so reductions near the top of the range are audible. The stored setting and displayed percentage remain the intuitive linear slider position. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesPerceptual gain curve for volume controls
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed due to a network error. 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. Comment |
Problem
Players reported having to turn the volume slider down to ~20% before noticing any change in loudness.
The sliders fed their linear 0–1 position straight to Howler's
volume(), which is linear amplitude gain. Human loudness perception is roughly logarithmic, so the top ~80% of the slider all sounds nearly identical — the classic linear-fader problem.Fix
Square the slider position into a perceptual (audio-taper) gain inside
SoundManager. The stored setting and the displayed%remain the intuitive linear slider position; only the gain handed to Howler is curved.Lowering the slider from 100→80 now produces an audible drop instead of nothing until ~20%.
Notes
Tests
Updated
SoundManager.test.tsto assert the curved gain and added a dedicated test locking in the top-of-range behavior. All 18 tests pass.