mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-22 19:31:31 +00:00
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:
parent
122fc34a75
commit
9012c7f0a8
4 changed files with 17 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue