Gapless playback, crossfade and volume levelling

- Two-deck player keeps the next song loaded and buffered, and blends it in 20 ms
  before the current one ends, so albums and playlists play without gaps
- Skipping to the next song uses the preloaded deck, so it starts instantly
- Optional crossfade (up to 12 s); songs from the same album stay gapless
- Optional volume levelling: uses ReplayGain tags or measures each song once
  (-14 LUFS, capped so boosts never clip); files are never changed
- Playback section at the top of Settings
This commit is contained in:
Christian
2026-11-18 22:25:12 -05:00
parent f6db780bca
commit 93db117243
9 changed files with 371 additions and 31 deletions
+9
View File
@@ -168,6 +168,15 @@
</header>
<div class="settings-scroll">
<div class="settings">
<h2 id="set-playback">Playback</h2>
<div class="group">
<div class="setting">
<div><strong>Crossfade</strong><span id="xfNote">Off. The next song is always loaded ahead, so songs play back to back with no gap.</span></div>
<div class="slider-row"><input type="range" class="range" id="xfRange" min="0" max="12" step="1" value="0" aria-label="Crossfade length" /><span class="slider-val" id="xfVal">Off</span></div>
</div>
<label class="setting"><div><strong>Even out volume</strong><span>Plays quiet and loud songs at a similar level, like streaming apps do. Each song is measured once; your files aren't changed.</span></div><input type="checkbox" class="switch" id="levelToggle" /></label>
</div>
<h2 id="set-files">Files</h2>
<div class="group">
<div class="setting">