[Audio] IntelliGainComp rev.2

This commit is contained in:
maikirakiwi 2022-04-03 14:34:54 -07:00
parent a81aeb4da9
commit 3f2cf50bd2
2 changed files with 3 additions and 3 deletions

View file

@ -773,7 +773,7 @@ const app = new Vue({
}
numbers.shift()
let peak = Math.max(numbers[6], numbers[7]) / 32768.0
let gain = Math.pow(10, ((-2 - (Math.log10(peak) * 20)) / 20))// EBU R 128 Compliant
let gain = Math.pow(10, ((-2.5 - (Math.log10(peak) * 20)) / 20))// EBU R 128 Compliant
console.debug(`[Cider][MaikiwiSoundCheck] Peak Gain: '${(Math.log10(peak) * 20).toFixed(2)}' dB | Adjusting '${(Math.log10(gain) * 20).toFixed(2)}' dB`)
try {
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))