[Android] Change max playback speed to 8
Nicolas Pomepuy
git at videolan.org
Wed Jun 5 14:57:38 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri May 24 07:48:37 2024 +0200| [8bf5635494a0df9e550ca5c7ea098d4bb2e18f3a] | committer: Duncan McNamara
Change max playback speed to 8
> https://code.videolan.org/videolan/vlc-android/commit/8bf5635494a0df9e550ca5c7ea098d4bb2e18f3a
---
application/vlc-android/res/layout/dialog_playback_speed.xml | 2 +-
.../src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/application/vlc-android/res/layout/dialog_playback_speed.xml b/application/vlc-android/res/layout/dialog_playback_speed.xml
index 3712cf8bf6..31e36d4f01 100644
--- a/application/vlc-android/res/layout/dialog_playback_speed.xml
+++ b/application/vlc-android/res/layout/dialog_playback_speed.xml
@@ -42,7 +42,7 @@
android:layout_weight="1"
android:gravity="bottom|right"
android:importantForAccessibility="no"
- android:text="4.00"
+ android:text="8.00"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/playback_speed_seek"
app:layout_constraintEnd_toEndOf="parent"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
index b0b2a41ae7..2d5f208fc7 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
@@ -62,7 +62,7 @@ class PlaybackSpeedDialog : VLCBottomSheetDialogFragment() {
if (playbackService == null || playbackService!!.currentMediaWrapper == null)
return
if (fromUser) {
- val rate = (4.0).pow(progress.toDouble() / 100.0 - 1).toFloat()
+ val rate = (8.0).pow(progress.toDouble() / 100.0 - 1).toFloat()
playbackService!!.setRate(rate, true)
updateInterface()
}
@@ -145,7 +145,7 @@ class PlaybackSpeedDialog : VLCBottomSheetDialogFragment() {
private fun setRateProgress() {
var speed = playbackService!!.rate.toDouble()
- speed = 100 * (1 + ln(speed) / ln(4.0))
+ speed = 100 * (1 + ln(speed) / ln(8.0))
binding.playbackSpeedSeek.progress = speed.toInt()
updateInterface()
}
@@ -153,7 +153,7 @@ class PlaybackSpeedDialog : VLCBottomSheetDialogFragment() {
private fun changeSpeedTo(newValue: Float) {
if (playbackService == null)
return
- if (newValue > 4.0F || newValue < 0.25F) return
+ if (newValue > 8.0F || newValue < 0.25F) return
playbackService!!.setRate(newValue, true)
setRateProgress()
}
More information about the Android
mailing list