Skip to content

Commit

Permalink
fix/ducking again (#79)
Browse files Browse the repository at this point in the history
when stopping a audio service self.current is set to None, we lose the reference and are unable to restore volume because of that (race condition)

ensure that when we stop a audio service we restore the default volume
  • Loading branch information
JarbasAl authored Jul 17, 2024
1 parent 6f2c0e1 commit 14f1758
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ovos_audio/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ def _perform_stop(self, message=None):
{"by": "audio:" + name})
self.bus.emit(msg)

# ensure we don't leave the volume ducked
self.current.restore_volume()
self.volume_is_low = False

self.current = None

@require_native_source()
Expand Down

0 comments on commit 14f1758

Please sign in to comment.