[Audio] fix #1182
This commit is contained in:
parent
a09127a826
commit
7d8c6a684a
2 changed files with 96 additions and 233 deletions
|
@ -80,6 +80,7 @@ const CiderAudio = {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.debug("[Cider][MaikiwiSoundCheck] normalizer func err: " + e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
normalizerOff: function () {
|
normalizerOff: function () {
|
||||||
|
@ -619,89 +620,54 @@ const CiderAudio = {
|
||||||
switch (app.cfg.audio.maikiwiAudio.ciderPPE_value) {
|
switch (app.cfg.audio.maikiwiAudio.ciderPPE_value) {
|
||||||
case "MAIKIWI":
|
case "MAIKIWI":
|
||||||
|
|
||||||
try {
|
try {
|
||||||
switch (localStorage.getItem("playingBitrate")) {
|
switch (localStorage.getItem("playingBitrate")) {
|
||||||
case "64":
|
case "64":
|
||||||
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver();
|
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver();
|
||||||
CiderAudio.audioNodes.llpw[0].normalize = false;
|
CiderAudio.audioNodes.llpw[0].normalize = false;
|
||||||
fetch('./cideraudio/impulses/CAP_64.wav').then(async (impulseData) => {
|
fetch('./cideraudio/impulses/CAP_64.wav').then(async (impulseData) => {
|
||||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
});
|
});
|
||||||
console.debug("[Cider][Audio] CAP Adaptive - 64kbps");
|
console.debug("[Cider][Audio] CAP Adaptive - 64kbps");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "256":
|
case "256":
|
||||||
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
||||||
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37; // Post Gain Compensation
|
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37; // Post Gain Compensation
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
||||||
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
||||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
});
|
});
|
||||||
console.debug("[Cider][Audio] CAP Adaptive - 256kbps_2_48k");
|
console.debug("[Cider][Audio] CAP Adaptive - 256kbps_2_48k");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
||||||
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37; // Post Gain Compensation
|
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37; // Post Gain Compensation
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
||||||
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
||||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
});
|
});
|
||||||
console.debug("[Cider][Audio] CAP Adaptive - CONFIG FALLBACK - 256kbps_2_48k");
|
console.debug("[Cider][Audio] CAP Adaptive - CONFIG FALLBACK - 256kbps_2_48k");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
|
||||||
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37;
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
|
||||||
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
|
||||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
|
||||||
});
|
|
||||||
console.debug("[Cider][Audio] CAP Adaptive - (Error Fallback) 256kbps");
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (destination) {
|
|
||||||
case "spatial":
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case "n5":
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n4':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n3':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n2':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n1':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n0':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
} catch (e) {
|
||||||
|
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver(); CiderAudio.audioNodes.llpw[0].normalize = false;
|
||||||
|
CiderAudio.audioNodes.llpw[1] = CiderAudio.context.createGain(); CiderAudio.audioNodes.llpw[1].gain.value = 2.37;
|
||||||
|
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[1]);
|
||||||
|
fetch('./cideraudio/impulses/CAP_256_FINAL_48k.wav').then(async (impulseData) => {
|
||||||
|
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||||
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
|
});
|
||||||
|
console.debug("[Cider][Audio] CAP Adaptive - (Error Fallback) 256kbps");
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
case "MAIKIWI_LEGACY":
|
case "MAIKIWI_LEGACY":
|
||||||
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver();
|
CiderAudio.audioNodes.llpw[0] = CiderAudio.context.createConvolver();
|
||||||
CiderAudio.audioNodes.llpw[0].normalize = false;
|
CiderAudio.audioNodes.llpw[0].normalize = false;
|
||||||
|
@ -709,41 +675,6 @@ const CiderAudio = {
|
||||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (destination) {
|
|
||||||
case "spatial":
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case "n5":
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n4':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n1':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n3':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n2':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n0':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug("[Cider][Audio] CAP - Maikiwi Signature Mode");
|
console.debug("[Cider][Audio] CAP - Maikiwi Signature Mode");
|
||||||
break;
|
break;
|
||||||
case "NATURAL":
|
case "NATURAL":
|
||||||
|
@ -754,41 +685,6 @@ const CiderAudio = {
|
||||||
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
CiderAudio.audioNodes.llpw[0].buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (destination) {
|
|
||||||
case "spatial":
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case "n5":
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n4':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n1':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.llpw[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n3':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n2':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n0':
|
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug("[Cider][Audio] CAP - Natural Mode");
|
console.debug("[Cider][Audio] CAP - Natural Mode");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -803,41 +699,7 @@ const CiderAudio = {
|
||||||
for (let i = 1; i < LLPW_FREQUENCIES.length; i ++) {
|
for (let i = 1; i < LLPW_FREQUENCIES.length; i ++) {
|
||||||
CiderAudio.audioNodes.llpw[i-1].connect(CiderAudio.audioNodes.llpw[i]);
|
CiderAudio.audioNodes.llpw[i-1].connect(CiderAudio.audioNodes.llpw[i]);
|
||||||
}
|
}
|
||||||
|
console.debug("[Cider][Audio] CAP - Legacy Mode");
|
||||||
switch (destination) {
|
|
||||||
case "spatial":
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case "n5":
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n4':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n1':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n3':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n2':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n0':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
console.debug("[Cider][Audio] CAP - Legacy Mode");
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -851,42 +713,43 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
app.cfg.audio.maikiwiAudio.ciderPPE_value = "MAIKIWI";
|
app.cfg.audio.maikiwiAudio.ciderPPE_value = "MAIKIWI";
|
||||||
|
|
||||||
switch (destination) {
|
|
||||||
case "spatial":
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case "n5":
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[1].connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n4':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[1].connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n1':
|
|
||||||
try {
|
|
||||||
CiderAudio.audioNodes.llpw[1].connect(CiderAudio.audioNodes.llpw[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
|
||||||
} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n3':
|
|
||||||
try { CiderAudio.audioNodes.llpw[1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n2':
|
|
||||||
try { CiderAudio.audioNodes.llpw[1].connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
|
||||||
break;
|
|
||||||
case 'n0':
|
|
||||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
console.debug("[Cider][Audio] CAP - Maikiwi Adaptive Mode (Defaulted from broki config)");
|
console.debug("[Cider][Audio] CAP - Maikiwi Adaptive Mode (Defaulted from broki config)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (destination) {
|
||||||
|
case "spatial":
|
||||||
|
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
||||||
|
break;
|
||||||
|
case "n5":
|
||||||
|
try {
|
||||||
|
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||||
|
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
||||||
|
} catch (e) { }
|
||||||
|
break;
|
||||||
|
case 'n4':
|
||||||
|
try {
|
||||||
|
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||||
|
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
||||||
|
} catch (e) { }
|
||||||
|
break;
|
||||||
|
case 'n3':
|
||||||
|
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
|
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
||||||
|
break;
|
||||||
|
case 'n2':
|
||||||
|
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
||||||
|
break;
|
||||||
|
case 'n1':
|
||||||
|
try {
|
||||||
|
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
console.debug("[Cider][Audio] llpw_n1 -> llpw");
|
||||||
|
} catch (e) { }
|
||||||
|
break;
|
||||||
|
case 'n0':
|
||||||
|
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] llpw_n1 -> destination");} catch (e) { }
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -868,6 +868,7 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
||||||
CiderAudio.audioNodes.gainNode.gain.value = gain
|
CiderAudio.audioNodes.gainNode.gain.value = gain
|
||||||
|
CiderAudio.hierarchical_loading();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -937,49 +938,48 @@ const app = new Vue({
|
||||||
self.$refs.queue.updateQueue();
|
self.$refs.queue.updateQueue();
|
||||||
}
|
}
|
||||||
this.currentSongInfo = a
|
this.currentSongInfo = a
|
||||||
|
if (a === null) {return;} // EVIL EMPTY OBJECTS BE GONE
|
||||||
|
|
||||||
|
console.debug("songinfo: " + JSON.stringify(a))
|
||||||
if (app.cfg.advanced.AudioContext) {
|
if (app.cfg.advanced.AudioContext) {
|
||||||
try {
|
try {
|
||||||
if (app.mk.nowPlayingItem.flavor.includes("64")) {
|
if (app.mk.nowPlayingItem.flavor.includes("64")) {
|
||||||
if (localStorage.getItem("playingBitrate") !== "64") {
|
localStorage.setItem("playingBitrate", "64")
|
||||||
localStorage.setItem("playingBitrate", "64")
|
|
||||||
CiderAudio.hierarchical_loading();
|
|
||||||
}
|
|
||||||
} else if (app.mk.nowPlayingItem.flavor.includes("256")) {
|
} else if (app.mk.nowPlayingItem.flavor.includes("256")) {
|
||||||
if (localStorage.getItem("playingBitrate") !== "256") {
|
localStorage.setItem("playingBitrate", "256")
|
||||||
localStorage.setItem("playingBitrate", "256")
|
|
||||||
CiderAudio.hierarchical_loading();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("playingBitrate", "256")
|
localStorage.setItem("playingBitrate", "256")
|
||||||
CiderAudio.hierarchical_loading();
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
localStorage.setItem("playingBitrate", "256")
|
localStorage.setItem("playingBitrate", "256")
|
||||||
CiderAudio.hierarchical_loading();
|
}
|
||||||
}
|
if (!app.cfg.audio.normalization) {CiderAudio.hierarchical_loading();}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.cfg.audio.normalization) {
|
if (app.cfg.audio.normalization) {
|
||||||
// get unencrypted audio previews to get SoundCheck's normalization tag
|
// get unencrypted audio previews to get SoundCheck's normalization tag
|
||||||
try {
|
try {
|
||||||
let previewURL = null
|
let previewURL = null
|
||||||
try {
|
try {
|
||||||
previewURL = app.mk.nowPlayingItem.previewURL
|
previewURL = app.mk.nowPlayingItem.previewURL
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
if (previewURL == null && ((app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)) != -1)) {
|
if (previewURL == null && ((app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)) != -1)) {
|
||||||
app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/songs/${app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)}`).then((response) => {
|
app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/songs/${app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)}`).then((response) => {
|
||||||
previewURL = response.data.data[0].attributes.previews[0].url
|
previewURL = response.data.data[0].attributes.previews[0].url
|
||||||
if (previewURL)
|
if (previewURL)
|
||||||
|
console.debug("[Cider][MaikiwiSoundCheck] previewURL response.data.data[0].attributes.previews[0].url: " + previewURL)
|
||||||
ipcRenderer.send('getPreviewURL', previewURL)
|
ipcRenderer.send('getPreviewURL', previewURL)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (previewURL)
|
if (previewURL)
|
||||||
|
console.debug("[Cider][MaikiwiSoundCheck] previewURL in app.mk.nowPlayingItem.previewURL: " + previewURL)
|
||||||
ipcRenderer.send('getPreviewURL', previewURL)
|
ipcRenderer.send('getPreviewURL', previewURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (e instanceof TypeError === false) {console.debug("[Cider][MaikiwiSoundCheck] normalizer function err: " + e)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue