diff --git a/src/xpra/client/ui_client_base.py b/src/xpra/client/ui_client_base.py index 73e3684fb3..bad4425733 100644 --- a/src/xpra/client/ui_client_base.py +++ b/src/xpra/client/ui_client_base.py @@ -1994,7 +1994,7 @@ def stop_receiving_sound(self, tell_server=True): ss = self.sound_sink self.speaker_enabled = False if tell_server: - self.send("sound-control", "stop") + self.send("sound-control", "stop", self.min_sound_sequence) self.min_sound_sequence += 1 self.send("sound-control", "new-sequence", self.min_sound_sequence) if ss is None: diff --git a/src/xpra/server/source.py b/src/xpra/server/source.py index dc1669682d..a7b04d2fae 100644 --- a/src/xpra/server/source.py +++ b/src/xpra/server/source.py @@ -988,6 +988,12 @@ def stop_receiving_sound(self): def sound_control(self, action, *args): soundlog("sound_control(%s, %s)", action, args) if action=="stop": + if len(args)>0: + sequence = int(args[0]) + if sequence!=self.sound_source_sequence: + log.warn("sound sequence mismatch: %i vs %i", sequence, self.sound_source_sequence) + return "not stopped" + soundlog("stop: sequence number matches") self.stop_sending_sound() return "stopped" elif action in ("start", "fadein"):