feat: custom buffer size (#2370)

* feat: custom buffer size

* cache buffer params

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-06-10 01:54:32 +00:00
committed by GitHub
parent 90d79b236f
commit 22f37074b1
13 changed files with 152 additions and 64 deletions

View File

@@ -0,0 +1,7 @@
import 'package:flutter/services.dart';
abstract final class FilteringText {
static final decimal = [
FilteringTextInputFormatter.allow(RegExp(r'[\d\.]+')),
];
}

View File

@@ -14,7 +14,8 @@ abstract final class SettingBoxKey {
defaultPicQa = 'defaultPicQa',
enableHA = 'enableHA',
audioOutput = 'audioOutput',
expandBuffer = 'expandBuffer',
bufferSize = 'bufferSize',
bufferSec = 'bufferSec',
hardwareDecoding = 'hardwareDecoding',
videoSync = 'videoSync',
autosync = 'autosync',

View File

@@ -797,8 +797,11 @@ abstract final class Pref {
static bool get enableLongShowControl =>
_setting.get(SettingBoxKey.enableLongShowControl, defaultValue: false);
static bool get expandBuffer =>
_setting.get(SettingBoxKey.expandBuffer, defaultValue: false);
static double get bufferSize =>
_setting.get(SettingBoxKey.bufferSize, defaultValue: 4.0);
static double get bufferSec =>
_setting.get(SettingBoxKey.bufferSec, defaultValue: 16.0);
static String get audioOutput => _setting.get(
SettingBoxKey.audioOutput,