# Player loudness metadata ## Observed response shape Player responses may include `playerConfig.audioConfig.loudnessDb` and `playerConfig.audioConfig.perceptualLoudnessDb`. Audio formats may also carry `loudnessDb`. Keep the response-level perceptual measurement and format-level relative loudness as separate values. For relative loudness, response-level `loudnessDb` takes precedence, then the format-level value fills the gap. AuraMusic's `YTPlayerUtils` combines a main player response's audio config with each selected audio format, and its format entity persists both values. InnerTubeX exposes format-level `loudnessDb` alongside response-level `perceptualLoudnessDb`. Sources consulted: - AuraMusic [`YTPlayerUtils.kt`](https://github.com/TeamAuraMusic/AuraMusic/blob/185a77d31733047de06cbec619d40731755a0ec1/app/src/main/kotlin/com/auramusic/app/utils/YTPlayerUtils.kt), commit `185a77d31733047de06cbec619d40731755a0ec1`. - Metrolist [`InnerTubeExtractor.kt`](https://github.com/MetrolistGroup/innertubex/blob/cc74e737b6ae2875343fb2e31c7283e39e1cf72e/src/commonMain/kotlin/com/metrolist/innertubex/extraction/InnerTubeExtractor.kt), commit `cc74e737b6ae2875343fb2e31c7283e39e1cf72e`. - Metrolist [`normalizationGainMb`](https://github.com/MetrolistGroup/Metrolist/blob/28fa8f042bfabb880bdecc0d9fa37e86cf72b90e/app/src/main/kotlin/com/metrolist/music/playback/MusicService.kt) treats perceptual loudness as LUFS and compares it to a target. Metrolist's normalization function prefers `perceptualLoudnessDb`; its `loudnessDb` fallback adds the selected aggressive target as a baseline. That baseline is a client choice and isn't carried into Hydraulophone. The captured initial Hydraulophone canary showed the same song at gain 0.970510 for High and 0.433511 for Standard when prioritizing relative loudness, a 7 dB difference. The follow-up on 2026-09-24 directly measured High relative 0.42 and Standard relative 7.42, with both reporting perceptual -6.58. Perceptual-first gain was 0.425598 for both paths. A quieter song reported High relative -13.53 and Standard relative -6.53, both perceptual -20.53; it correctly retained unity gain. This is evidence for these responses, not a guarantee for all clients. These are observations of unofficial, changing InnerTube behavior. Hydraulophone keeps the values optional, rejects non-finite values, and does not modify media bytes. Its policy prefers `perceptualLoudnessDb` and targets -14 LUFS. If that is absent, it attenuates positive `loudnessDb` directly without adding an assumed baseline, and never boosts. Missing metadata means unity gain. The 24 dB attenuation cap is an app safety choice. Compare raw numeric metadata from both clients in a canary before changing the fallback interpretation. Core's `AudioLoudnessResolving` metadata refresh sends one authenticated player request with the existing WEB_REMIX profile and reads only loudness metadata. It does not fetch media, decipher URLs, or request proof-of-origin tokens. `TrackCacheStore.updateLoudness` updates metadata in progressive and HLS cache indexes without removing media files or disturbing active file/package leases. The OfflineMusicService wrapper applies its ordinary online gate to this request. Test scope is recorded in [audio-loudness.md test brief](../test-briefs/audio-loudness.md).