Add option for logarithmic volume scaling

Introduces a user setting to enable logarithmic (quadratic) volume scaling for more natural audio perception.
This commit is contained in:
Adam 2025-12-25 07:55:47 +00:00
parent 122fc34a75
commit 9012c7f0a8
4 changed files with 17 additions and 2 deletions

View file

@ -290,7 +290,9 @@ export default class LocalAudioPlayer extends EventEmitter {
setVolume(volume) {
if (!this.player) return
this.player.volume = volume
const useLogarithmicVolume = this.ctx.$store.getters['user/getUserSetting']('useLogarithmicVolume')
// Apply quadratic curve for more natural volume perception if enabled
this.player.volume = useLogarithmicVolume ? volume * volume : volume
}
// Utils