Modify audio player volume by 2% instead of 5%
This commit is contained in:
@@ -315,12 +315,12 @@ class baseBuffer(object):
|
||||
pass
|
||||
|
||||
def volume_down(self):
|
||||
""" Decreases player volume by 5%"""
|
||||
player.player.volume = player.player.volume-5
|
||||
""" Decreases player volume by 2%"""
|
||||
player.player.volume = player.player.volume-2
|
||||
|
||||
def volume_up(self):
|
||||
""" Increases player volume by 5%"""
|
||||
player.player.volume = player.player.volume+5
|
||||
""" Increases player volume by 2%"""
|
||||
player.player.volume = player.player.volume+2
|
||||
|
||||
def play_audio(self, *args, **kwargs):
|
||||
""" Play audio in currently focused buffer, if possible."""
|
||||
|
@@ -808,10 +808,10 @@ class Controller(object):
|
||||
self.search("me_audio").play_all()
|
||||
|
||||
def menu_volume_down(self, *args, **kwargs):
|
||||
player.player.volume = player.player.volume-5
|
||||
player.player.volume = player.player.volume-2
|
||||
|
||||
def menu_volume_up(self, *args, **kwargs):
|
||||
player.player.volume = player.player.volume+5
|
||||
player.player.volume = player.player.volume+2
|
||||
|
||||
def menu_mute(self, *args, **kwargs):
|
||||
player.player.volume = 0
|
||||
|
@@ -98,6 +98,10 @@ class audioPlayer(object):
|
||||
def volume(self, vol):
|
||||
if vol <= 100 and vol >= 0:
|
||||
self.vol = vol
|
||||
elif vol < 0:
|
||||
self.vol = 0
|
||||
elif vol > 100:
|
||||
self.vol = 100
|
||||
if self.stream != None:
|
||||
self.stream.volume = self.vol/100.0
|
||||
|
||||
|
Reference in New Issue
Block a user