From 14f1758641c05cb0b989e79364e38685d88059be Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:54:30 +0100 Subject: [PATCH] fix/ducking again (#79) 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 --- ovos_audio/audio.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovos_audio/audio.py b/ovos_audio/audio.py index b870f92..c338e79 100644 --- a/ovos_audio/audio.py +++ b/ovos_audio/audio.py @@ -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()