Coerce loudnessDb in -10f,+10f

This commit is contained in:
vfsfitvnm 2022-10-13 13:54:38 +02:00
parent c8d03a9c9d
commit 7ed138ea51

View file

@ -406,7 +406,8 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
.distinctUntilChanged()
.filterNotNull()
.flowOn(Dispatchers.IO)
.collect { x ->
.collect { loudnessDb ->
val x = loudnessDb.coerceIn(-10f, 10f)
val x2 = x * x
val x3 = x2 * x
val x4 = x2 * x2