yxw 2023-11-23 12:20:51 +08:00
parent 1f53b7c9de
commit 9880b2acc9
1 changed files with 25 additions and 4 deletions

View File

@ -963,6 +963,10 @@
let mic1Value = 0 let mic1Value = 0
let mic2Value = 0 let mic2Value = 0
let outputValue = 0 let outputValue = 0
let lineinputPost = false
let mic1Post = false
let mic2Post = false
let outputPost = false
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
loadData() loadData()
@ -1225,21 +1229,25 @@
data.lineinput = resData.content.lineinput data.lineinput = resData.content.lineinput
lineinputValue = data.lineinput.audio.toFixed(1) lineinputValue = data.lineinput.audio.toFixed(1)
LineInputSlider(data.lineinput.audio.toFixed(1)) LineInputSlider(data.lineinput.audio.toFixed(1))
lineinputPost = false
} }
else if (module == 'mic1') { else if (module == 'mic1') {
data.mic1 = resData.content.mic1 data.mic1 = resData.content.mic1
mic1Value = data.mic1.audio.toFixed(1) mic1Value = data.mic1.audio.toFixed(1)
Microphone1Slider(data.mic1.audio.toFixed(1)) Microphone1Slider(data.mic1.audio.toFixed(1))
mic1Post = false
} }
else if (module == 'mic2') { else if (module == 'mic2') {
data.mic2 = resData.content.mic2 data.mic2 = resData.content.mic2
mic2Value = data.mic2.audio.toFixed(1) mic2Value = data.mic2.audio.toFixed(1)
Microphone2Slider(data.mic2.audio.toFixed(1)) Microphone2Slider(data.mic2.audio.toFixed(1))
mic2Post = false
} }
else { else {
data.output = resData.content.output data.output = resData.content.output
outputValue = data.output.audio.toFixed(1) outputValue = data.output.audio.toFixed(1)
OutputVolumeSlider(data.output.audio.toFixed(1)) OutputVolumeSlider(data.output.audio.toFixed(1))
outputPost = false
} }
// bindData() // bindData()
} }
@ -1367,7 +1375,10 @@
} }
console.log(number, lineinputValue, typeof (number), typeof (lineinputValue)) console.log(number, lineinputValue, typeof (number), typeof (lineinputValue))
if (number != lineinputValue && isInput == false) { 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)) console.log(number, mic1Value, typeof (number), typeof (mic1Value))
if (mic1Value != number && isInput == false) { 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)) console.log(number, mic2Value, typeof (number), typeof (mic2Value))
if (mic2Value != number && isInput == false) { 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)) console.log(number, outputValue, typeof (number), typeof (outputValue))
if (outputValue != number && isInput == false) { if (outputValue != number && isInput == false) {
changeInputValue('output', number) if (outputPost == false) {
outputPost = true
changeInputValue('output', number)
}
} }
} }