Modify audio player volume by 2% instead of 5%
This commit is contained in:
parent
f10b25c07f
commit
8f631cfe4b
@ -2,6 +2,11 @@
|
||||
|
||||
## changes in this version
|
||||
|
||||
* Improvements in the audio player module:
|
||||
* When modifying volume of the playing audio, it will decrease or increase the volume by 2% instead of 5%.
|
||||
|
||||
## Changes in version 0.19 (13.03.2019)
|
||||
|
||||
* Added a new buffer called documents. When loading the buffer, it will contain all documents owned by the current user. The context menu of any item will allow you to download the document to your computer or remove it from VK.
|
||||
* A new buffer, called online, has been added in the friends section. It contains friends currently connected to VK. Items in this buffer will be added as soon as new friends are online in the social network, and will be removed when friends are offline. This buffer needs a lot of testing. Please report any possible inconsistency on this method.
|
||||
* Added new options to open the config and logs folder, these options are located in the help menu and may be useful during error reporting.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user