[Audio] Fix of an fix that was supposed to fix a fix

This commit is contained in:
maikirakiwi 2022-04-08 15:46:58 -07:00
parent 9ad13bcc8d
commit 8a766e51a8
2 changed files with 4 additions and 4 deletions

View file

@ -185,8 +185,8 @@ const CiderAudio = {
}
if (maxGain == -120) {maxGain = 1}
if (CiderAudio.audioNodes.llpw !== null && CiderAudio.audioNodes.llpw.length == 1) {maxGain = maxGain * 1.109174815262401}
if (CiderAudio.audioNodes.atmosphereRealizer !== null) {maxGain = maxGain * 1.17489755493953}
if (app.cfg.audio.maikiwiAudio.spatial === true) {
if (app.cfg.audio.maikiwiAudio.atmosphereRealizer == true) {maxGain = maxGain * 1.096478196143185}
if (app.cfg.audio.maikiwiAudio.spatial == true) {
let spatialProfile = CiderAudio.spatialProfiles.find(function (profile) {
return profile.id === app.cfg.audio.maikiwiAudio.spatialProfile;
});

View file

@ -776,8 +776,8 @@ const app = new Vue({
}
numbers.shift()
let peak = Math.max(numbers[6], numbers[7]) / 32768.0
let gain = Math.pow(10, ((-0.8 - (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) - 0.2}' dB`)
let gain = Math.pow(10, ((-0.7 - (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) - 0.3}' dB`)
try {
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
CiderAudio.audioNodes.gainNode.gain.value = gain