Skip to content

Commit

Permalink
mpd: expose non-linear volume
Browse files Browse the repository at this point in the history
sonata/mpdroid show them as is. Report the cubic one instead
so the client slider scale matches the QL one.
  • Loading branch information
lazka committed Sep 16, 2015
1 parent dc6fd18 commit 44aa244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quodlibet/quodlibet/ext/events/mpdserver/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def seekcur(self, value, relative):
def setvol(self, value):
"""value: 0..100"""

self._app.player.volume = value / 100.0
self._app.player.volume = (value / 100.0) ** 3.0

def repeat(self, value):
self._options.set_repeat(value)
Expand Down Expand Up @@ -357,7 +357,7 @@ def status(self):
state = "stop"

status = [
("volume", int(app.player.volume * 100)),
("volume", int((app.player.volume ** (1.0 / 3.0)) * 100)),
("repeat", int(self._options.get_repeat())),
("random", int(self._options.get_random())),
("single", int(self._options.get_single())),
Expand Down

0 comments on commit 44aa244

Please sign in to comment.