cleaning up a separate func

This commit is contained in:
Maikiwi 2022-02-13 20:49:41 -08:00
parent 8559eca7f0
commit 9c28719881

View file

@ -197,21 +197,16 @@ var CiderAudio = {
} }
}, },
hiererchical_unloading: function (){ hiererchical_unloading: function (){
if (app.cfg.audio.spatial) {CiderAudio.audioNodes.spatialNode.output.disconnect();} else {CiderAudio.audioNodes.gainNode.disconnect();}
try { try {
for (var i of CiderAudio.audioNodes.llpw){ CiderAudio.audioNodes.spatialNode.output.disconnect(); CiderAudio.audioNodes.gainNode.disconnect();
i.disconnect(); for (var i of CiderAudio.audioNodes.llpw){i.disconnect();}
} for (var i of CiderAudio.audioNodes.vibrantbassNode){i.disconnect();}
} catch(e){}
try {
for (var i of CiderAudio.audioNodes.vibrantbassNode){
i.disconnect();
}
} catch(e){}
} catch(e){}
}, },
hierarchical_loading: function (){ hierarchical_loading: function (){
CiderAudio.hiererchical_unloading();
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.vibrantbass_h2_1(true) CiderAudio.vibrantbass_h2_1(true)