mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-10 18:04:06 +02:00
feat(replaygain): add Opus R128 gain tags
Write R128_TRACK_GAIN/R128_ALBUM_GAIN (Q7.8, ref -23 LUFS) alongside the existing REPLAYGAIN_* tags for .opus files so spec-compliant Opus players (RFC 7845) apply gain. Covers per-track and album embed during download (incl. SAF) and standalone re-scan.
This commit is contained in:
1 parent
1489378ffd
commit
ef52332b8b
2 files changed
+52
-6
No files matched your search
@@ -4860,6 +4860,10 @@ class DownloadQueueNotifier extends Notifier<DownloadQueueState> {
|
||||
scannedReplayGain = rgResult;
|
||||
metadata['REPLAYGAIN_TRACK_GAIN'] = rgResult.trackGain;
|
||||
metadata['REPLAYGAIN_TRACK_PEAK'] = rgResult.trackPeak;
|
||||
if (format == 'opus') {
|
||||
final r128 = FFmpegService.replayGainDbToR128(rgResult.trackGain);
|
||||
if (r128 != null) metadata['R128_TRACK_GAIN'] = r128;
|
||||
}
|
||||
_log.d(
|
||||
'ReplayGain for $format: gain=${rgResult.trackGain}, peak=${rgResult.trackPeak}',
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user