From 9c09c9b1df8ba39b8f51b0bdbb4dc54a895ebf4a Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 8 Mar 2010 17:33:46 +0100 Subject: [PATCH] Automatically choose AlsaMixer on Linux and DummyMixer elsewhere --- docs/installation.rst | 5 ----- mopidy/settings/default.py | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index eecd5ab4..c256de51 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -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`. diff --git a/mopidy/settings/default.py b/mopidy/settings/default.py index 44f63dea..65db36a3 100644 --- a/mopidy/settings/default.py +++ b/mopidy/settings/default.py @@ -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: #: