summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-26 18:46:55 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-26 18:49:24 +0100
commit1a8fcf81a06ad569ebd83a16a8c7c21d32dff442 (patch)
tree02436f4ef7fee2a73314fd77066f7366b60e40fa /src/tests/ecore/ecore_test_ecore_audio.c
parent6c7dbf67afb12ba8e1c1b7f9433b14e0dc00a94c (diff)
ecore_audio: Test the looped signal/code path as well
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 8c6623c..c1e3e26 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -307,7 +307,14 @@ static Eina_Bool _finished_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const
307{ 307{
308 ecore_main_loop_quit(); 308 ecore_main_loop_quit();
309 309
310 return EINA_FALSE; 310 return EINA_TRUE;
311}
312
313static Eina_Bool _looped_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
314{
315 eo_do(obj, ecore_audio_obj_in_looped_set(EINA_FALSE));
316
317 return EINA_TRUE;
311} 318}
312 319
313START_TEST(ecore_test_ecore_audio_obj_tone) 320START_TEST(ecore_test_ecore_audio_obj_tone)
@@ -333,6 +340,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
333 eo_do(in, ecore_audio_obj_in_length_get(&len)); 340 eo_do(in, ecore_audio_obj_in_length_get(&len));
334 fail_if(len != 2.5); 341 fail_if(len != 2.5);
335 342
343 eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
344
336 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 345 eo_do(in, ecore_audio_obj_in_remaining_get(&len));
337 fail_if(len != 2.5); 346 fail_if(len != 2.5);
338 347
@@ -375,6 +384,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
375 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); 384 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
376 fail_if(!ret); 385 fail_if(!ret);
377 386
387 eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_LOOPED, _looped_cb, NULL));
378 eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, NULL)); 388 eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, NULL));
379 389
380 ecore_main_loop_begin(); 390 ecore_main_loop_begin();