summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2013-12-21 09:26:57 -0500
committerMike Blumenkrantz <zmike@samsung.com>2013-12-21 09:26:57 -0500
commitbe6351f15e20512ffb7dad03faa62745f9085945 (patch)
tree3adff7491011e4a80a22fad473a339411103c494 /src
parentea1ae87962150c7ea92886884ba7443cc9e86a7a (diff)
fix mixer regression which broke non-pulseaudio support
Diffstat (limited to 'src')
-rw-r--r--src/modules/mixer/sys_pulse.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c
index 79a47bde5..b874d3951 100644
--- a/src/modules/mixer/sys_pulse.c
+++ b/src/modules/mixer/sys_pulse.c
@@ -29,9 +29,9 @@ _pulse_start(void *d EINA_UNUSED)
29} 29}
30 30
31static Eina_Bool 31static Eina_Bool
32_pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add *inst) 32_pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add *ev)
33{ 33{
34 if (inst->exe != pulse_inst) return ECORE_CALLBACK_RENEW; 34 if (ev->exe != pulse_inst) return ECORE_CALLBACK_RENEW;
35 if (!update_timer) 35 if (!update_timer)
36 update_timer = ecore_timer_add(2.0, _pulse_start, NULL); 36 update_timer = ecore_timer_add(2.0, _pulse_start, NULL);
37 pa_started = EINA_TRUE; 37 pa_started = EINA_TRUE;
@@ -39,6 +39,18 @@ _pulse_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Add
39 return ECORE_CALLBACK_DONE; 39 return ECORE_CALLBACK_DONE;
40} 40}
41 41
42static Eina_Bool
43_pulse_not_started(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Del *ev)
44{
45 if (ev->exe != pulse_inst) return ECORE_CALLBACK_RENEW;
46 if (!pa_started)
47 {
48 E_FREE_LIST(handlers, ecore_event_handler_del);
49 e_mod_mixer_pulse_ready(EINA_FALSE);
50 }
51 return ECORE_CALLBACK_DONE;
52}
53
42static void 54static void
43_pulse_info_get(Pulse *d __UNUSED__, int type __UNUSED__, Pulse_Server_Info *ev) 55_pulse_info_get(Pulse *d __UNUSED__, int type __UNUSED__, Pulse_Server_Info *ev)
44{ 56{
@@ -312,7 +324,8 @@ e_mixer_pulse_init(void)
312 pulse_inst = ecore_exe_run("start-pulseaudio-x11", NULL); 324 pulse_inst = ecore_exe_run("start-pulseaudio-x11", NULL);
313 if (!pulse_inst) return EINA_FALSE; 325 if (!pulse_inst) return EINA_FALSE;
314 326
315 E_LIST_HANDLER_APPEND(handlers, E_EVENT_EXEC_NEW, (Ecore_Event_Handler_Cb)_pulse_started, NULL); 327 E_LIST_HANDLER_APPEND(handlers, ECORE_EXE_EVENT_ADD, (Ecore_Event_Handler_Cb)_pulse_started, NULL);
328 E_LIST_HANDLER_APPEND(handlers, ECORE_EXE_EVENT_DEL, (Ecore_Event_Handler_Cb)_pulse_not_started, NULL);
316 329
317 return EINA_TRUE; 330 return EINA_TRUE;
318 } 331 }