all: reformat
This commit is contained in:
parent
5efdfb6aac
commit
3a04bef074
1 changed files with 10 additions and 8 deletions
|
|
@ -20,7 +20,6 @@ package org.oxycblt.auxio.music.metadata
|
||||||
|
|
||||||
import androidx.core.text.isDigitsOnly
|
import androidx.core.text.isDigitsOnly
|
||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.common.MimeTypes
|
|
||||||
import androidx.media3.exoplayer.MetadataRetriever
|
import androidx.media3.exoplayer.MetadataRetriever
|
||||||
import androidx.media3.exoplayer.source.MediaSource
|
import androidx.media3.exoplayer.source.MediaSource
|
||||||
import androidx.media3.exoplayer.source.TrackGroupArray
|
import androidx.media3.exoplayer.source.TrackGroupArray
|
||||||
|
|
@ -99,7 +98,6 @@ private class TagWorkerImpl(
|
||||||
populateWithId3v2(textTags.id3v2)
|
populateWithId3v2(textTags.id3v2)
|
||||||
populateWithVorbis(textTags.vorbis)
|
populateWithVorbis(textTags.vorbis)
|
||||||
|
|
||||||
|
|
||||||
// OPUS base gain interpretation code: This is likely not needed, as the media player
|
// OPUS base gain interpretation code: This is likely not needed, as the media player
|
||||||
// should be using the base gain already. Uncomment if that's not the case.
|
// should be using the base gain already. Uncomment if that's not the case.
|
||||||
// if (format.sampleMimeType == MimeTypes.AUDIO_OPUS
|
// if (format.sampleMimeType == MimeTypes.AUDIO_OPUS
|
||||||
|
|
@ -331,7 +329,11 @@ private class TagWorkerImpl(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun List<String>.parseR128Adjustment() =
|
private fun List<String>.parseR128Adjustment() =
|
||||||
first().replace(REPLAYGAIN_ADJUSTMENT_FILTER_REGEX, "").toFloatOrNull()?.nonZeroOrNull()?.run {
|
first()
|
||||||
|
.replace(REPLAYGAIN_ADJUSTMENT_FILTER_REGEX, "")
|
||||||
|
.toFloatOrNull()
|
||||||
|
?.nonZeroOrNull()
|
||||||
|
?.run {
|
||||||
// Convert to fixed-point and adjust to LUFS 18 to match the ReplayGain scale
|
// Convert to fixed-point and adjust to LUFS 18 to match the ReplayGain scale
|
||||||
this / 256f + 5
|
this / 256f + 5
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue