diff --git a/docs/changelog.rst b/docs/changelog.rst index e6f0942e..ac9f4830 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -51,6 +51,22 @@ Internal changes :issue:`1115`) +v1.0.2 (UNRELEASED) +=================== + +Bug fix release. + +- HTTP: Make event broadcasts work with Tornado 2.3, the previous threading fix + broke this. + +- Audio: Fix for :issue:`1097` tuned down the buffer size in the queue. Turns + out this can cause distortions in certain cases. Give this an other go with + a more generous buffer size. (Fixes: :issue:`1147`) + +- Audio: Make sure mute events get emitted by software mixer. + (Fixes: :issue:`1146`) + + v1.0.1 (2015-04-23) =================== diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 674e68e1..111f21a7 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -169,7 +169,7 @@ class _Outputs(gst.Bin): # All tee branches need a queue in front of them. # But keep the queue short so the volume change isn't to slow: queue = gst.element_factory_make('queue') - queue.set_property('max-size-buffers', 5) + queue.set_property('max-size-buffers', 15) self.add(element) self.add(queue) queue.link(element) @@ -199,16 +199,14 @@ class SoftwareMixer(object): def set_volume(self, volume): self._element.set_property('volume', volume / 100.0) - self._mixer.trigger_volume_changed(volume) + self._mixer.trigger_volume_changed(self.get_volume()) def get_mute(self): return self._element.get_property('mute') def set_mute(self, mute): - result = self._element.set_property('mute', bool(mute)) - if result: - self._mixer.trigger_mute_changed(bool(mute)) - return result + self._element.set_property('mute', bool(mute)) + self._mixer.trigger_mute_changed(self.get_mute()) class _Handler(object): diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index 0a579f18..0802f1e8 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -88,9 +88,13 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler): @classmethod def broadcast(cls, msg): + if hasattr(tornado.ioloop.IOLoop, 'current'): + loop = tornado.ioloop.IOLoop.current() + else: + loop = tornado.ioloop.IOLoop.instance() # Fallback for 2.3 + # This can be called from outside the Tornado ioloop, so we need to # safely cross the thread boundary by adding a callback to the loop. - loop = tornado.ioloop.IOLoop.current() for client in cls.clients: # One callback per client to keep time we hold up the loop short loop.add_callback(_send_broadcast, client, msg)