From 9880b2acc9baef9e8b680bf15f0376d836edf5a4 Mon Sep 17 00:00:00 2001 From: yxw <17074267@qq.com> Date: Thu, 23 Nov 2023 12:20:51 +0800 Subject: [PATCH] fix --- home.html | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/home.html b/home.html index c290482..ec7c582 100644 --- a/home.html +++ b/home.html @@ -963,6 +963,10 @@ let mic1Value = 0 let mic2Value = 0 let outputValue = 0 + let lineinputPost = false + let mic1Post = false + let mic2Post = false + let outputPost = false document.addEventListener("DOMContentLoaded", function () { loadData() @@ -1225,21 +1229,25 @@ data.lineinput = resData.content.lineinput lineinputValue = data.lineinput.audio.toFixed(1) LineInputSlider(data.lineinput.audio.toFixed(1)) + lineinputPost = false } else if (module == 'mic1') { data.mic1 = resData.content.mic1 mic1Value = data.mic1.audio.toFixed(1) Microphone1Slider(data.mic1.audio.toFixed(1)) + mic1Post = false } else if (module == 'mic2') { data.mic2 = resData.content.mic2 mic2Value = data.mic2.audio.toFixed(1) Microphone2Slider(data.mic2.audio.toFixed(1)) + mic2Post = false } else { data.output = resData.content.output outputValue = data.output.audio.toFixed(1) OutputVolumeSlider(data.output.audio.toFixed(1)) + outputPost = false } // bindData() } @@ -1367,7 +1375,10 @@ } console.log(number, lineinputValue, typeof (number), typeof (lineinputValue)) if (number != lineinputValue && isInput == false) { - changeInputValue('lineinput', number) + if (lineinputPost == false) { + lineinputPost = true + changeInputValue('lineinput', number) + } } } @@ -1409,7 +1420,10 @@ } console.log(number, mic1Value, typeof (number), typeof (mic1Value)) if (mic1Value != number && isInput == false) { - changeInputValue('mic1', number) + if (mic1Post == false) { + mic1Post = true + changeInputValue('mic1', number) + } } } @@ -1453,7 +1467,10 @@ } console.log(number, mic2Value, typeof (number), typeof (mic2Value)) if (mic2Value != number && isInput == false) { - changeInputValue('mic2', number) + if (mic2Post == false) { + mic2Post = true + changeInputValue('mic2', number) + } } } @@ -1498,7 +1515,11 @@ } console.log(number, outputValue, typeof (number), typeof (outputValue)) if (outputValue != number && isInput == false) { - changeInputValue('output', number) + if (outputPost == false) { + outputPost = true + + changeInputValue('output', number) + } } }