Adjust audio levels animation.

fork-5.53.8
Rashad Sookram 2022-04-11 11:56:46 -04:00
rodzic 66b6420f21
commit 08abe890ff
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import android.view.animation.DecelerateInterpolator
import android.widget.FrameLayout
import org.signal.core.util.DimensionUnit
import org.thoughtcrime.securesms.R
@ -89,6 +90,7 @@ class AudioIndicatorView(context: Context, attrs: AttributeSet) : FrameLayout(co
return ValueAnimator.ofFloat(currentHeight, finalHeight).apply {
duration = WebRtcActionProcessor.AUDIO_LEVELS_INTERVAL.toLong()
interpolator = DecelerateInterpolator()
}
}

Wyświetl plik

@ -91,9 +91,9 @@ data class CallParticipant constructor(
fun fromRawAudioLevel(raw: Int): AudioLevel {
return when {
raw < 500 -> LOWEST
raw < 2000 -> LOW
raw < 8000 -> MEDIUM
raw < 20000 -> HIGH
raw < 1000 -> LOW
raw < 5000 -> MEDIUM
raw < 16000 -> HIGH
else -> HIGHEST
}
}