Skip to content

Commit

Permalink
fix/ducking
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed May 19, 2024
1 parent 797edef commit 7b009e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovos_plugin_vlc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ def __init__(self, config, bus=None, name='ovos_vlc'):
self.config = config
self.bus = bus
self.name = name
self.normal_volume = None
self.normal_volume = 100
self.low_volume = self.config.get('low_volume', 30)
self._playback_time = 0
self.player.audio_set_volume(100)
self._last_sync = 0

###################
Expand Down Expand Up @@ -104,10 +103,11 @@ def resume(self):
self.player.set_pause(0)

def lower_volume(self):
self.normal_volume = self.player.audio_get_volume() # remember volume
self.player.audio_set_volume(self.low_volume)

def restore_volume(self):
self.player.audio_set_volume(100)
self.player.audio_set_volume(self.normal_volume)

def track_info(self):
""" Extract info of current track. """
Expand Down

0 comments on commit 7b009e8

Please sign in to comment.