Automatically choose AlsaMixer on Linux and DummyMixer elsewhere

This commit is contained in:
Stein Magnus Jodal 2010-03-08 17:33:46 +01:00
parent c95fef4343
commit 9c09c9b1df
2 changed files with 12 additions and 7 deletions

View File

@ -160,11 +160,6 @@ libspotify backend, copy the Spotify application key to
BACKENDS = (u'mopidy.backends.libspotify.LibspotifyBackend',)
*OS X:* The default mixer does not work on OS X, so you must change to a dummy
mixer::
MIXER = u'mopidy.mixers.dummy.DummyMixer'
For a full list of available settings, see :mod:`mopidy.settings.default`.

View File

@ -7,6 +7,8 @@ Available settings and their default values.
``mopidy/settings/local.py`` and redefine settings there.
"""
import sys
#: List of playback backends to use. Default::
#:
#: BACKENDS = (u'mopidy.backends.despotify.DespotifyBackend',)
@ -23,10 +25,18 @@ BACKENDS = (
#: the format.
CONSOLE_LOG_FORMAT = u'%(levelname)-8s %(asctime)s [%(threadName)s] %(name)s\n %(message)s'
#: Sound mixer to use. Default::
#: Sound mixer to use.
#:
#: Default on Linux::
#:
#: MIXER = u'mopidy.mixers.alsa.AlsaMixer'
MIXER = u'mopidy.mixers.alsa.AlsaMixer'
#:
#: Default on other operating systems::
#:
#: MIXER = u'mopidy.mixers.dummy.DummyMixer'
MIXER = u'mopidy.mixers.dummy.DummyMixer'
if sys.platform == 'linux2':
MIXER = u'mopidy.mixers.alsa.AlsaMixer'
#: Which address Mopidy should bind to. Examples:
#: