Added basic/advanced volume control tooltip (#1092)

Basic volume control tooltip will be in a percentage. Advanced volume control will be in dBFS
This commit is contained in:
brandinio 2022-05-31 20:54:27 +01:00 committed by GitHub
parent 378cf21af6
commit 07f1f48a99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -297,7 +297,8 @@ const app = new Vue({
}
},
formatVolumeTooltip() {
return this.cfg.audio.dBSPL ? (Number(this.cfg.audio.dBSPLcalibration) + (Math.log10(this.mk.volume) * 20)).toFixed(2) + ' dB SPL' : (Math.log10(this.mk.volume) * 20).toFixed(2) + ' dBFS'
let advancedTooltip = this.cfg.audio.dBSPL ? (Number(this.cfg.audio.dBSPLcalibration) + (Math.log10(this.mk.volume) * 20)).toFixed(2) + ' dB SPL' : (Math.log10(this.mk.volume) * 20).toFixed(2) + ' dBFS'
return this.cfg.audio.advanced ? advancedTooltip : (this.mk.volume * 100).toFixed(0) + '%'
},
mainMenuVisibility(val, isContextMenu) {
if(this.chrome.sidebarCollapsed && !isContextMenu) {