audio: Update #886 workaround to work with new audio APIs
This commit is contained in:
parent
83a5246074
commit
8e4b019127
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user