aboutsummaryrefslogtreecommitdiffstats
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:27:29 -0500
commit905db54414f2b8cf01f0f85e33daef075f627965 (patch)
treea8c4f089e8353b9a2e79dd8409ef2e8867c84082 /src
parentUpdate russian translation (diff)
downloadenlightenment-905db54414f2b8cf01f0f85e33daef075f627965.tar.gz
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)
}
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;
}