Pass backend reference to the mixer constructor, just like for the other controllers

This commit is contained in:
Stein Magnus Jodal 2010-08-14 02:41:34 +02:00
parent dba0346a27
commit d48dba0fe4
2 changed files with 8 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class BaseBackend(object):
if mixer is not None:
self.mixer = mixer
else:
self.mixer = get_class(settings.MIXER)()
self.mixer = get_class(settings.MIXER)(self)
#: A :class:`multiprocessing.Queue` which can be used by e.g. library
#: callbacks executing in other threads to send messages to the core

View File

@ -1,6 +1,11 @@
class BaseMixer(object):
def __init__(self, *args, **kwargs):
pass
"""
:param backend: a backend instance
:type mixer: :class:`mopidy.backends.base.BaseBackend`
"""
def __init__(self, backend, *args, **kwargs):
self.backend = backend
@property
def volume(self):