summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-08-22 19:40:39 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-08-26 15:45:07 -0300
commit8356b16a49d4f653d61940763eff947466b44e24 (patch)
treeb5d8e533b3df4ad45f2ea97071b7a826ae5d04b5 /src/lib/ecore_audio
parent6b3ca899e8a60642466ddb6d7c7574b0c3ad9d9c (diff)
Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks; calling only event callbacks registered with the given event description pointer. Create the method Efl.Object.event_callback_legacy_call to inherit the old behavior from Efl.Object.event_callback_call, calling both Efl.Object events and legacy smart callbacks. Update all other files accordingly in order to still supply legacy callbacks while they are necessary.
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in.c8
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_pulse.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.c b/src/lib/ecore_audio/ecore_audio_obj_in.c
index ff8bd5b900..c4af7c42cb 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_in.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_in.c
@@ -27,7 +27,7 @@ _ecore_audio_in_speed_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, double
27 27
28 obj->speed = speed; 28 obj->speed = speed;
29 29
30 efl_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL); 30 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL);
31} 31}
32 32
33EOLIAN static double 33EOLIAN static double
@@ -41,7 +41,7 @@ _ecore_audio_in_samplerate_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, i
41{ 41{
42 obj->samplerate = samplerate; 42 obj->samplerate = samplerate;
43 43
44 efl_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL); 44 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL);
45} 45}
46 46
47EOLIAN static int 47EOLIAN static int
@@ -107,11 +107,11 @@ _ecore_audio_in_read(Eo *eo_obj, Ecore_Audio_Input *obj, void *buf, size_t len)
107 len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len); 107 len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len);
108 if (len_read == 0) { 108 if (len_read == 0) {
109 if (!obj->looped || !obj->seekable) { 109 if (!obj->looped || !obj->seekable) {
110 efl_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL); 110 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL);
111 } else { 111 } else {
112 ecore_audio_obj_in_seek(eo_obj, 0, SEEK_SET); 112 ecore_audio_obj_in_seek(eo_obj, 0, SEEK_SET);
113 len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len); 113 len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len);
114 efl_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL); 114 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL);
115 } 115 }
116 } 116 }
117 117
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
index 5adef64a67..58130b273e 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
@@ -220,12 +220,12 @@ static void _state_cb(pa_context *context, void *data EINA_UNUSED)
220 if (state == PA_CONTEXT_READY) { 220 if (state == PA_CONTEXT_READY) {
221 DBG("PA context ready."); 221 DBG("PA context ready.");
222 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) { 222 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
223 efl_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL); 223 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL);
224 } 224 }
225 } else if ((state == PA_CONTEXT_FAILED) || (state == PA_CONTEXT_TERMINATED)) { 225 } else if ((state == PA_CONTEXT_FAILED) || (state == PA_CONTEXT_TERMINATED)) {
226 DBG("PA context fail."); 226 DBG("PA context fail.");
227 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) { 227 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
228 efl_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL); 228 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL);
229 } 229 }
230 } else { 230 } else {
231 DBG("Connection state %i", state); 231 DBG("Connection state %i", state);
@@ -251,7 +251,7 @@ static void _state_job(void *data EINA_UNUSED)
251 } 251 }
252 // the callback here can delete things in the list.. 252 // the callback here can delete things in the list..
253 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) { 253 EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
254 efl_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL); 254 efl_event_callback_legacy_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL);
255 } 255 }
256 // now unref everything safely 256 // now unref everything safely
257 EINA_LIST_FOREACH_SAFE(class_vars.outputs, out, tmp, eo_obj) { 257 EINA_LIST_FOREACH_SAFE(class_vars.outputs, out, tmp, eo_obj) {