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
This commit is contained in:
parent
2735d2af0c
commit
c8a105bdba
|
@ -127,7 +127,8 @@ _config_set(Emix_Config *config)
|
||||||
void
|
void
|
||||||
emix_config_init(emix_config_backend_changed cb, const void *userdata)
|
emix_config_init(emix_config_backend_changed cb, const void *userdata)
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *backends, *l;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
EINA_SAFETY_ON_FALSE_RETURN(emix_init());
|
EINA_SAFETY_ON_FALSE_RETURN(emix_init());
|
||||||
_emix_config_dd_new();
|
_emix_config_dd_new();
|
||||||
|
@ -135,9 +136,25 @@ emix_config_init(emix_config_backend_changed cb, const void *userdata)
|
||||||
if (!_config)
|
if (!_config)
|
||||||
{
|
{
|
||||||
_config = E_NEW(Emix_Config, 1);
|
_config = E_NEW(Emix_Config, 1);
|
||||||
l = emix_backends_available();
|
backends = emix_backends_available();
|
||||||
if (l)
|
// prefer pulseaudio as a packend if it exists as this is generally
|
||||||
_config->backend = eina_stringshare_add(l->data);
|
// more useful, and a superset of ALSA. so if pulse is there, alsa
|
||||||
|
// is too - so choosing alsa if pulse is available is wrong (as a
|
||||||
|
// default) and leads to brokenness. in the case pulse is not
|
||||||
|
// around, alsa will then work
|
||||||
|
EINA_LIST_FOREACH(backends, l, s)
|
||||||
|
{
|
||||||
|
if (!strcmp(s, "PULSEAUDIO"))
|
||||||
|
{
|
||||||
|
_config->backend = eina_stringshare_add(s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!_config->backend)
|
||||||
|
{
|
||||||
|
if (backends)
|
||||||
|
_config->backend = eina_stringshare_add(backends->data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_config->save == 0) _config->save = 1;
|
if (_config->save == 0) _config->save = 1;
|
||||||
|
|
Loading…
Reference in New Issue