v0.99.1: Boost Volume no longer re-encodes: it raises an MP3's own gain setting (mp3gain's method, 1.5 dB steps, bit-exact and reversible) toward a typical song's loudness, never clipping; Get Info only, and only for MP3s

This commit is contained in:
2026-11-19 23:14:30 -08:00
parent a7d061b200
commit 6797910d76
7 changed files with 456 additions and 292 deletions
+16 -14
View File
@@ -139,20 +139,22 @@ persistence) → GUI (Qt widgets that read the manager and connect to its signal
without recursing. Widgets react to its signals (`playlists_changed`,
`playlist_content_changed(pid)`, `track_updated(id)`, `track_fields_edited`).
- **Boost Volume** (Round 131, `boost.py`; Get Info's button and the
right-click menu) replaced Round 79's per-track Volume Adjustment, which
scaled the slider and so could never play past full — with the slider up
it did nothing (normalization has the same ceiling for quiet songs). The
file itself is amplified once: ebur128 measures integrated loudness and
true peak, the target is a *typical* song (`LoudnessAnalyzer.typical_lufs`,
the median measured), the clean limit is the true peak to −1 dBTP; when
typical needs more, the warning offers both (clean, or all the way and
clipping — trav wants iTunes' clipping boost available). ffmpeg rewrites
the same format (MP3 at V0, AAC 320k, lossless as itself), tags and art
copied, staged in `lossless.staging_root()`, then
`replace_track_files(…, in_place=True)` trashes the original and puts the
boosted file at the same path — one undo step. A boost of the playing song
`Player.reopen_current()`s it where it was (no new listen).
- **Boost Volume** (Round 131, `boost.py`; Get Info's button, shown only
for an MP3 it can treat) replaced Round 79's per-track Volume Adjustment,
which scaled the slider and so could never play past full — with the
slider up it did nothing (normalization has the same ceiling for quiet
songs). **Never transcode** (trav's rule, after v0.99.0 re-encoded and
was pulled): it adds the same number of units to every granule's 8-bit
`global_gain` in the MP3 side info, mp3gain's method — 1.5 dB a unit,
decoded audio exactly × 2^(units/4), same length, nothing else changes.
Granules with `part2_3_length` 0 are silence (LAME parks them at 210/255)
and are skipped; CRC-protected frames make a file unsupported; the
Xing/Info frame is left alone (LAME's tag CRCs it). How much: whole units
toward a *typical* song (`LoudnessAnalyzer.typical_lufs`), never past −1
dBTP true peak — **no clipping, no options**, one Boost/Cancel. A boosted
copy is staged, then `replace_track_files(…, in_place=True)` trashes the
original and puts the copy at the same path — one undo step. Boosting the
playing song `Player.reopen_current()`s it where it was (no new listen).
`Track.volume_adjustment` is still imported and stored but nothing reads it.
- **Volume normalization** (Round 83, `loudness.py`, Controls → Normalize