kopia lustrzana https://github.com/ryukoposting/Signal-Android
Adjust audio levels animation.
rodzic
66b6420f21
commit
08abe890ff
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue