新增 bd9 对接 webui

This commit is contained in:
eafonyang
2026-09-24 18:35:12 +08:00
parent 6b3dea2f05
commit e5fae70adc
13 changed files with 246 additions and 112 deletions
+2 -5
View File
@@ -24,6 +24,7 @@ import {
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import {
getVolumeStep,
INPUT_BLUETOOTH_INDEX,
INPUT_LABELS,
isHomeVolumeLockedByPassthrough,
@@ -433,11 +434,7 @@ export default function Home() {
const vuLabel = `${homeText.vu ?? "VU表"}${(ds.vu ?? 0) + 1}`;
const bypassOn = (ds.dsp_enable ?? 0) === 0;
// Home 的 volume 取值为 0..200,对应 dB = (v - 200) / 2
// 因此 1 个 volume 单位 = 0.5dB
// AudioPage 的 soundStep:0->0.5dB, 1->1dB, 2->2dB, 3->3dB
// 换算为 volume 单位:0.5/1/2/3 dB -> 1/2/4/6
const fineVolumeStep = [1, 2, 4, 6][ds.soundStep ?? 1] ?? 1;
const fineVolumeStep = getVolumeStep(ds.soundStep);
// Slider fill % (0-200 → 0-100%)
const fillPct = (localVol / 200) * 100;