From fcb00b7092793ae2b576485cbb561c4168ce0e93 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 4 May 2016 10:30:34 +0000 Subject: [PATCH] #1178: * queue events should update the queue state not the global state, as the "starting" state is also used to ignore some underrun and overrun events * remove unused underrun_events list git-svn-id: https://xpra.org/svn/Xpra/trunk@12526 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/sound/sink.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xpra/sound/sink.py b/src/xpra/sound/sink.py index 506f65b5b5..6cf8819225 100755 --- a/src/xpra/sound/sink.py +++ b/src/xpra/sound/sink.py @@ -83,7 +83,6 @@ def __init__(self, sink_type=None, sink_options={}, codecs=get_codecs(), codec_o self.overruns = 0 self.underruns = 0 self.overrun_events = deque(maxlen=100) - self.underrun_events = deque(maxlen=100) self.queue_state = "starting" self.last_underrun = 0 self.last_overrun = 0 @@ -152,12 +151,12 @@ def cleanup(self): def queue_pushing(self, *args): - self.update_state("pushing") + self.queue_state = "pushing" self.emit_info() return True def queue_running(self, *args): - self.update_state("running") + self.queue_state = "running" self.set_min_level() self.set_max_level() self.emit_info() @@ -168,11 +167,10 @@ def queue_underrun(self, *args): if self.queue_state=="starting" or 1000*(now-self.start_time)2: self.last_underrun = now self.set_min_level() - self.underrun_events.append(now) self.emit_info() return 1