further cideraudio trimming
This commit is contained in:
parent
a5aa162eb6
commit
7247c3fd6c
1 changed files with 36 additions and 41 deletions
|
@ -422,27 +422,27 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 4:
|
case 'h2_3':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 'h2_2':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.audioBands[0]);
|
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -467,22 +467,22 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 3:
|
case 'h2_2':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.llpw[0]);
|
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.audioBands[0]);
|
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -510,13 +510,13 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -534,13 +534,13 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -562,13 +562,13 @@ const CiderAudio = {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[c_LLPW_FREQUENCIES.length - 1].connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -586,13 +586,13 @@ const CiderAudio = {
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 2:
|
case 'h2_1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 'h0':
|
||||||
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
try { CiderAudio.audioNodes.llpw[0].connect(CiderAudio.context.destination); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -624,12 +624,12 @@ const CiderAudio = {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 0:
|
case 'h0':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.context.destination);
|
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.context.destination);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'h1':
|
||||||
try { CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
try { CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.audioBands[0]); } catch (e) { }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -667,44 +667,39 @@ const CiderAudio = {
|
||||||
const configMap = await CiderAudio.config_mapping();
|
const configMap = await CiderAudio.config_mapping();
|
||||||
CiderAudio.hierarchical_unloading();
|
CiderAudio.hierarchical_unloading();
|
||||||
|
|
||||||
console.debug('Started loading')
|
|
||||||
let nextTier = 0, lastNode = 'h0';
|
let nextTier = 0, lastNode = 'h0';
|
||||||
for (let [tier, value] of configMap.entries()) {
|
for (let [tier, value] of configMap.entries()) {
|
||||||
if (value === true) {
|
if (value === true) {
|
||||||
switch (tier) {
|
switch (tier) {
|
||||||
case 'h1':
|
case 'h1':
|
||||||
CiderAudio.equalizer(true, nextTier);
|
CiderAudio.equalizer(true, lastNode);
|
||||||
lastNode = 'h1'; nextTier = 1;
|
lastNode = 'h1';
|
||||||
break;
|
break;
|
||||||
case 'h2_1':
|
case 'h2_1':
|
||||||
CiderAudio.vibrantbass_h2_1(true, nextTier);
|
CiderAudio.vibrantbass_h2_1(true, lastNode);
|
||||||
lastNode = 'h2_1'; nextTier = 2;
|
lastNode = 'h2_1';
|
||||||
break;
|
break;
|
||||||
case 'h2_2':
|
case 'h2_2':
|
||||||
app.cfg.audio.normalization = true;
|
app.cfg.audio.normalization = true;
|
||||||
CiderAudio.llpw_h2_2(true, nextTier);
|
CiderAudio.llpw_h2_2(true, lastNode);
|
||||||
lastNode = 'h2_2'; nextTier = 3;
|
lastNode = 'h2_2';
|
||||||
break;
|
break;
|
||||||
case 'h2_3':
|
case 'h2_3':
|
||||||
app.cfg.audio.normalization = true;
|
app.cfg.audio.normalization = true;
|
||||||
CiderAudio.atmosphereRealizer1_h2_3(true, nextTier);
|
CiderAudio.atmosphereRealizer1_h2_3(true, lastNode);
|
||||||
lastNode = 'h2_3'; nextTier = 4;
|
lastNode = 'h2_3';
|
||||||
break;
|
break;
|
||||||
case 'h2_4':
|
case 'h2_4':
|
||||||
app.cfg.audio.normalization = true;
|
app.cfg.audio.normalization = true;
|
||||||
CiderAudio.atmosphereRealizer2_h2_4(true, nextTier);
|
CiderAudio.atmosphereRealizer2_h2_4(true, lastNode);
|
||||||
lastNode = 'h2_4'; nextTier = 5;
|
lastNode = 'h2_4';
|
||||||
break;
|
break;
|
||||||
case 'spatial':
|
case 'spatial':
|
||||||
if (app.cfg.audio.maikiwiAudio.spatial === true) { // Vibrant Bass, CAP, Atmosphere Realizer 1, Maikiwi Spatial
|
app.cfg.audio.normalization = true
|
||||||
app.cfg.audio.normalization = true
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (lastNode) {
|
switch (lastNode) {
|
||||||
|
@ -785,7 +780,7 @@ const CiderAudio = {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (hierarchy) {
|
switch (hierarchy) {
|
||||||
case 0:
|
case 'h0':
|
||||||
try {
|
try {
|
||||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.context.destination);
|
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.context.destination);
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue