summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-11-14 10:13:36 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-11-14 10:14:30 +0900
commite5f56f95e9c67239162f6508a3cf609ebdcbce90 (patch)
tree59bcde202a31494f528839433046610607783b19
parenta785df425c194a2e1fc78bdeb397f0d10f03357a (diff)
e mixer fix - fix default mixer to pulse if there
this makes e use the correct mixer backend if pulse is available as opposed to using alsa going behind pulses back. @fix
-rw-r--r--src/modules/mixer/e_mod_config.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/modules/mixer/e_mod_config.c b/src/modules/mixer/e_mod_config.c
index 92751e19b..1dad09389 100644
--- a/src/modules/mixer/e_mod_config.c
+++ b/src/modules/mixer/e_mod_config.c
@@ -127,7 +127,8 @@ _config_set(Emix_Config *config)
127void 127void
128emix_config_init(emix_config_backend_changed cb, const void *userdata) 128emix_config_init(emix_config_backend_changed cb, const void *userdata)
129{ 129{
130 const Eina_List *l; 130 const Eina_List *backends, *l;
131 const char *s;
131 132
132 EINA_SAFETY_ON_FALSE_RETURN(emix_init()); 133 EINA_SAFETY_ON_FALSE_RETURN(emix_init());
133 _emix_config_dd_new(); 134 _emix_config_dd_new();
@@ -135,9 +136,25 @@ emix_config_init(emix_config_backend_changed cb, const void *userdata)
135 if (!_config) 136 if (!_config)
136 { 137 {
137 _config = E_NEW(Emix_Config, 1); 138 _config = E_NEW(Emix_Config, 1);
138 l = emix_backends_available(); 139 backends = emix_backends_available();
139 if (l) 140 // prefer pulseaudio as a packend if it exists as this is generally
140 _config->backend = eina_stringshare_add(l->data); 141 // more useful, and a superset of ALSA. so if pulse is there, alsa
142 // is too - so choosing alsa if pulse is available is wrong (as a
143 // default) and leads to brokenness. in the case pulse is not
144 // around, alsa will then work
145 EINA_LIST_FOREACH(backends, l, s)
146 {
147 if (!strcmp(s, "PULSEAUDIO"))
148 {
149 _config->backend = eina_stringshare_add(s);
150 break;
151 }
152 }
153 if (!_config->backend)
154 {
155 if (backends)
156 _config->backend = eina_stringshare_add(backends->data);
157 }
141 } 158 }
142 159
143 if (_config->save == 0) _config->save = 1; 160 if (_config->save == 0) _config->save = 1;