fix mixer regression which broke non-pulseaudio support
This commit is contained in:
parent
ea1ae87962
commit
be6351f15e
|
@ -29,9 +29,9 @@ _pulse_start(void *d EINA_UNUSED)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add *inst)
|
||||
_pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add *ev)
|
||||
{
|
||||
if (inst->exe != pulse_inst) return ECORE_CALLBACK_RENEW;
|
||||
if (ev->exe != pulse_inst) return ECORE_CALLBACK_RENEW;
|
||||
if (!update_timer)
|
||||
update_timer = ecore_timer_add(2.0, _pulse_start, NULL);
|
||||
pa_started = EINA_TRUE;
|
||||
|
@ -39,6 +39,18 @@ _pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add
|
|||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_pulse_not_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Del *ev)
|
||||
{
|
||||
if (ev->exe != pulse_inst) return ECORE_CALLBACK_RENEW;
|
||||
if (!pa_started)
|
||||
{
|
||||
E_FREE_LIST(handlers, ecore_event_handler_del);
|
||||
e_mod_mixer_pulse_ready(EINA_FALSE);
|
||||
}
|
||||
return ECORE_CALLBACK_DONE;
|
||||
}
|
||||
|
||||
static void
|
||||
_pulse_info_get(Pulse *d __UNUSED__, int type __UNUSED__, Pulse_Server_Info *ev)
|
||||
{
|
||||
|
@ -312,7 +324,8 @@ e_mixer_pulse_init(void)
|
|||
pulse_inst = ecore_exe_run("start-pulseaudio-x11", NULL);
|
||||
if (!pulse_inst) return EINA_FALSE;
|
||||
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_EXEC_NEW, (Ecore_Event_Handler_Cb)_pulse_started, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_EXE_EVENT_ADD, (Ecore_Event_Handler_Cb)_pulse_started, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_EXE_EVENT_DEL, (Ecore_Event_Handler_Cb)_pulse_not_started, NULL);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue