audio: Update #886 workaround to work with new audio APIs

This commit is contained in:
Stein Magnus Jodal 2015-02-12 23:33:01 +01:00
parent 83a5246074
commit 8e4b019127

View File

@ -546,12 +546,16 @@ class Audio(pykka.ThreadingActor):
# XXX: Hack to workaround issue on Mac OS X where volume level
# does not persist between track changes. mopidy/mopidy#886
current_volume = self.get_volume()
if self.mixer is not None:
current_volume = self.mixer.get_volume()
else:
current_volume = None
self._tags = {} # TODO: add test for this somehow
self._playbin.set_property('uri', uri)
self.set_volume(current_volume)
if self.mixer is not None and current_volume is not None:
self.mixer.set_volume(current_volume)
def set_appsrc(
self, caps, need_data=None, enough_data=None, seek_data=None):