fix catch(e)
This commit is contained in:
parent
5802c5e0f6
commit
c5deeef26b
2 changed files with 21 additions and 9 deletions
|
@ -131,18 +131,18 @@ var CiderAudio = {
|
||||||
CiderAudio.audioNodes.llpw[i].Q.value = LLPW_Q[i];
|
CiderAudio.audioNodes.llpw[i].Q.value = LLPW_Q[i];
|
||||||
CiderAudio.audioNodes.llpw[i].gain.value = LLPW_GAIN[i] * app.cfg.audio.ciderPPE_value * CiderAudio.audioNodes.llpwEnabled;
|
CiderAudio.audioNodes.llpw[i].gain.value = LLPW_GAIN[i] * app.cfg.audio.ciderPPE_value * CiderAudio.audioNodes.llpwEnabled;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].disconnect();} catch(e){}
|
||||||
|
|
||||||
for (i = 1; i < LLPW_FREQUENCIES.length; i ++) {
|
for (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]);
|
||||||
}
|
}
|
||||||
if (hierarchy === 2) {
|
if (hierarchy === 2) {
|
||||||
try{
|
try{
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].disconnect();
|
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);} catch(e){}}
|
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);} catch(e){}}
|
||||||
|
|
||||||
else if (hierarchy === 1) {
|
else if (hierarchy === 1) {
|
||||||
try{
|
try{
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].disconnect();
|
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.audioBands[0]);} catch(e){}}
|
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.audioBands[0]);} catch(e){}}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -169,6 +169,9 @@ var CiderAudio = {
|
||||||
CiderAudio.audioNodes.vibrantbassNode[i].gain.value = VIBRANTBASSGAIN[i] * app.cfg.audio.vibrantBass.multiplier;
|
CiderAudio.audioNodes.vibrantbassNode[i].gain.value = VIBRANTBASSGAIN[i] * app.cfg.audio.vibrantBass.multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
CiderAudio.audioNodes.vibrantbassNode[VIBRANTBASSBANDS.length-1].disconnect();} catch(e){}
|
||||||
|
|
||||||
for (i = 1; i < VIBRANTBASSBANDS.length; i ++) {
|
for (i = 1; i < VIBRANTBASSBANDS.length; i ++) {
|
||||||
CiderAudio.audioNodes.vibrantbassNode[i-1].connect(CiderAudio.audioNodes.vibrantbassNode[i]);
|
CiderAudio.audioNodes.vibrantbassNode[i-1].connect(CiderAudio.audioNodes.vibrantbassNode[i]);
|
||||||
}
|
}
|
||||||
|
@ -212,44 +215,52 @@ var CiderAudio = {
|
||||||
|
|
||||||
if (app.cfg.audio.spatial) {
|
if (app.cfg.audio.spatial) {
|
||||||
try{
|
try{
|
||||||
CiderAudio.audioNodes.spatialNode.output.disconnect(CiderAudio.context.destination);
|
CiderAudio.audioNodes.spatialNode.output.disconnect(CiderAudio.context.destination);} catch(e){}
|
||||||
if (app.cfg.audio.vibrantBass.multiplier != 0) { // If vibrant bass is enabled
|
if (app.cfg.audio.vibrantBass.multiplier != 0) { // If vibrant bass is enabled
|
||||||
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP & vibrant bass is enabled
|
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP & vibrant bass is enabled
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
console.log("[Cider][Audio] Spatial is connecting to LLPW")
|
||||||
}
|
}
|
||||||
else { // If only vibrant bass is enabled
|
else { // If only vibrant bass is enabled
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
|
console.log("[Cider][Audio] Spatial is connecting to Vibrant Bass")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // If vibrant bass is disabled
|
else { // If vibrant bass is disabled
|
||||||
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP is enabled & vibrant bass is disabled
|
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP is enabled & vibrant bass is disabled
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
console.log("[Cider][Audio] Spatial is connecting to LLPW")
|
||||||
}
|
}
|
||||||
else { // If CAP & vibrant bass is disabled
|
else { // If CAP & vibrant bass is disabled
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||||
|
console.log("[Cider][Audio] Spatial is connecting to EQ")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(e){}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
try{
|
try{
|
||||||
CiderAudio.audioNodes.gainNode.disconnect(CiderAudio.context.destination);
|
CiderAudio.audioNodes.gainNode.disconnect(CiderAudio.context.destination);} catch(e){}
|
||||||
if (app.cfg.audio.vibrantBass.multiplier != 0) { // If vibrant bass is enabled
|
if (app.cfg.audio.vibrantBass.multiplier != 0) { // If vibrant bass is enabled
|
||||||
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP & vibrant bass is enabled
|
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP & vibrant bass is enabled
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
console.log("[Cider][Audio] Gain is connecting to LLPW")
|
||||||
}
|
}
|
||||||
else { // If only vibrant bass is enabled
|
else { // If only vibrant bass is enabled
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
|
console.log("[Cider][Audio] Gain is connecting to Vibrant Bass")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // If vibrant bass is disabled
|
else { // If vibrant bass is disabled
|
||||||
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP is enabled & vibrant bass is disabled
|
if (CiderAudio.audioNodes.llpwEnabled == 1) { // If CAP is enabled & vibrant bass is disabled
|
||||||
CCiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
console.log("[Cider][Audio] Gain is connecting to LLPW")
|
||||||
}
|
}
|
||||||
else { // If CAP & vibrant bass is disabled
|
else { // If CAP & vibrant bass is disabled
|
||||||
CCiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]);
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||||
|
console.log("[Cider][Audio] Gain is connecting to EQ")
|
||||||
}
|
}
|
||||||
}} catch(e){}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log("[Cider][Audio] Finished hierarchical loading");
|
console.log("[Cider][Audio] Finished hierarchical loading");
|
||||||
|
|
|
@ -2355,6 +2355,7 @@ const app = new Vue({
|
||||||
app.mk.nowPlayingItem['attributes']['lossless'] = true
|
app.mk.nowPlayingItem['attributes']['lossless'] = true
|
||||||
CiderAudio.audioNodes.llpwEnabled = 1
|
CiderAudio.audioNodes.llpwEnabled = 1
|
||||||
console.log("[Cider][Audio] PPE Kicking in...");
|
console.log("[Cider][Audio] PPE Kicking in...");
|
||||||
|
CiderAudio.hierarchical_loading();
|
||||||
/**}
|
/**}
|
||||||
else {
|
else {
|
||||||
CiderAudio.audioNodes.llpwEnabled = 0
|
CiderAudio.audioNodes.llpwEnabled = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue