holy balls optimization
This commit is contained in:
parent
8a94bf247f
commit
b4b6b0f988
8 changed files with 25 additions and 70 deletions
|
@ -33,11 +33,14 @@ if (app.cfg.advanced.disableLogging === true) {
|
|||
// Mount Vue to #app
|
||||
app.$mount("#app")
|
||||
|
||||
// Init CiderAudio
|
||||
if (app.cfg.advanced.AudioContext === true) {
|
||||
CiderAudio.init()
|
||||
// Init CiderAudio and force audiocontext
|
||||
if (app.cfg.advanced.AudioContext != true) {
|
||||
app.cfg.advanced.AudioContext = true;
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
CiderAudio.init()
|
||||
|
||||
// Import gamepad support
|
||||
app.simulateGamepad = simulateGamepad
|
||||
app.spawnMica = spawnMica
|
||||
|
|
|
@ -1007,8 +1007,8 @@ const app = new Vue({
|
|||
try {localStorage.setItem("playingBitrate", app.mk.nowPlayingItem.flavor)}
|
||||
catch(e) {}
|
||||
}
|
||||
if (!app.cfg.audio.normalization && app.cfg.advanced.AudioContext === false) { CiderAudio.hierarchical_loading(); }
|
||||
|
||||
|
||||
if (app.cfg.audio.normalization === false) { CiderAudio.hierarchical_loading(); } // Just Reload for Adaptive CAP if norm is off
|
||||
else {
|
||||
// get unencrypted audio previews to get SoundCheck's normalization tag
|
||||
try {
|
||||
|
@ -4354,7 +4354,7 @@ const app = new Vue({
|
|||
"id": "equalizer",
|
||||
"icon": "../views/svg/speaker.svg",
|
||||
"name": app.getLz('term.equalizer'),
|
||||
"hidden": true,
|
||||
"hidden": false,
|
||||
"action": function () {
|
||||
app.modals.equalizer = true
|
||||
app.modals.audioSettings = false
|
||||
|
@ -4364,7 +4364,7 @@ const app = new Vue({
|
|||
"id": "audioLab",
|
||||
"icon": "../views/svg/speaker.svg",
|
||||
"name": app.getLz('settings.option.audio.audioLab'),
|
||||
"hidden": true,
|
||||
"hidden": false,
|
||||
"action": function () {
|
||||
app.openSettingsPage('audiolabs')
|
||||
}
|
||||
|
@ -4372,10 +4372,12 @@ const app = new Vue({
|
|||
]
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (this.cfg.advanced.AudioContext) {
|
||||
menus.normal.items.find(i => i.id === 'audioLab').hidden = false
|
||||
menus.normal.items.find(i => i.id === 'equalizer').hidden = false
|
||||
}
|
||||
*/
|
||||
if (this.contextExt) {
|
||||
if (this.contextExt.normal) {
|
||||
menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
</button>
|
||||
<button
|
||||
class="usermenu-item"
|
||||
@click="cfg.advanced.AudioContext ? modals.castMenu = true :(cfg.advanced.AudioContext = true, modals.castMenu = true)"
|
||||
@click="modals.castMenu = true"
|
||||
>
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/cast.svg") %>
|
||||
|
@ -76,7 +76,7 @@
|
|||
</button>
|
||||
<button
|
||||
class="usermenu-item"
|
||||
@click="cfg.advanced.AudioContext ? modals.audioSettings = true : (cfg.advanced.AudioContext = true, modals.audioSettings = true)"
|
||||
@click="modals.audioSettings = true"
|
||||
>
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/headphones.svg") %>
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
<button class="playback-button--small cast"
|
||||
:title="$root.getLz('term.cast')"
|
||||
v-b-tooltip.hover
|
||||
@click="cfg.advanced.AudioContext ? modals.castMenu = true : (cfg.advanced.AudioContext = true, modals.castMenu = true)"></button>
|
||||
@click="modals.castMenu = true"></button>
|
||||
</div>
|
||||
<div class="app-chrome-item generic">
|
||||
<button class="playback-button--small queue" :class="{'active': drawer.panel == 'queue'}"
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
</div>
|
||||
<div class="app-chrome-item generic">
|
||||
<button class="playback-button--small cast" :title="$root.getLz('term.cast')"
|
||||
@click="cfg.advanced.AudioContext ? modals.castMenu = true : (cfg.advanced.AudioContext = true, modals.castMenu = true)"
|
||||
@click="modals.castMenu = true"
|
||||
v-b-tooltip.hover></button>
|
||||
</div>
|
||||
<div class="app-chrome-item generic">
|
||||
|
|
|
@ -348,20 +348,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality')}}
|
||||
<br>
|
||||
<small>{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<label>
|
||||
<input type="checkbox" v-model="app.cfg.advanced.AudioContext"
|
||||
v-on:change="toggleAudioContext"
|
||||
switch/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('term.equalizer')}}
|
||||
</div>
|
||||
|
@ -371,7 +357,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment" style="white-space: pre-line;">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.audioNormalization')}}
|
||||
<small>{{app.cfg.audio.equalizer.vibrantBass != 0 ||
|
||||
|
@ -391,7 +377,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="md-option-line"
|
||||
v-show="app.cfg.advanced.AudioContext && app.cfg.audio.normalization && app.cfg.audio.advanced">
|
||||
v-show="app.cfg.audio.normalization && app.cfg.audio.advanced">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.dbspl.display')}}
|
||||
<br>
|
||||
|
@ -419,7 +405,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</b-tab>
|
||||
<b-tab v-if="app.cfg.advanced.AudioContext">
|
||||
<b-tab>
|
||||
<template #title>
|
||||
<div>
|
||||
<svg-icon url="./assets/feather/zap.svg" classes="svg-md" name="settings-audiolabs"/>
|
||||
|
@ -1488,21 +1474,6 @@
|
|||
removeExperiment(flag) {
|
||||
app.cfg.advanced.experiments.splice(app.cfg.advanced.experiments.indexOf(flag), 1);
|
||||
},
|
||||
toggleAudioContext: function () {
|
||||
if (app.cfg.advanced.AudioContext === true) {
|
||||
if (navigator.hardwareConcurrency < 6) {
|
||||
app.confirm(app.getLz("settings.warn.audio.enableAdvancedFunctionality.lowcores"), function (result) {
|
||||
if (result) {
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
},
|
||||
toggleNormalization: function () {
|
||||
if (app.cfg.audio.normalization) {
|
||||
CiderAudio.normalizerOn()
|
||||
|
|
|
@ -6,15 +6,7 @@
|
|||
<b-jumbotron :header="$root.getLz('settings.option.audio.audioLab')"
|
||||
lead="Designed by Cider Acoustic Technologies in California"></b-jumbotron>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === false">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.warn.audioLab.withoutAF')}}
|
||||
</div>
|
||||
<button class="md-btn" style="margin-top: 5px;" onclick="app.appRoute('settings')">
|
||||
{{$root.getLz('term.settings')}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPE')}}
|
||||
<br>
|
||||
|
@ -44,7 +36,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
Cider Opportunistic Correction System
|
||||
<br>
|
||||
|
@ -59,7 +51,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer')}} [1]
|
||||
<br>
|
||||
|
@ -84,7 +76,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer')}} [2]
|
||||
<br>
|
||||
|
@ -109,7 +101,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization')}}
|
||||
<br>
|
||||
|
@ -139,7 +131,7 @@
|
|||
<div class="md-option-header">
|
||||
<span>{{$root.getLz('settings.header.unfinished')}}</span>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
Cider Origami™️ Vocal Enhancer/Remasterer
|
||||
<br>
|
||||
|
|
|
@ -98,19 +98,6 @@
|
|||
<div class="md-option-container">
|
||||
<div class="settings-option-body">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{getLz('settings.option.audio.enableAdvancedFunctionality')}}
|
||||
<br>
|
||||
<small>{{getLz('settings.option.audio.enableAdvancedFunctionality.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<label>
|
||||
<input type="checkbox" v-model="$root.cfg.advanced.AudioContext"
|
||||
switch/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="$root.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPE')}}
|
||||
<br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue