diff options
author | Daniel Willmann <d.willmann@samsung.com> | 2013-04-26 18:46:55 +0100 |
---|---|---|
committer | Daniel Willmann <d.willmann@samsung.com> | 2013-04-26 18:49:24 +0100 |
commit | 1a8fcf81a06ad569ebd83a16a8c7c21d32dff442 (patch) | |
tree | 02436f4ef7fee2a73314fd77066f7366b60e40fa /src/tests | |
parent | 6c7dbf67afb12ba8e1c1b7f9433b14e0dc00a94c (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')
-rw-r--r-- | src/tests/ecore/ecore_test_ecore_audio.c | 12 |
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 8c6623c75..c1e3e2656 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 { ecore_main_loop_quit(); - return EINA_FALSE; + return EINA_TRUE; +} + +static Eina_Bool _looped_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) +{ + eo_do(obj, ecore_audio_obj_in_looped_set(EINA_FALSE)); + + return EINA_TRUE; } START_TEST(ecore_test_ecore_audio_obj_tone) @@ -333,6 +340,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone) eo_do(in, ecore_audio_obj_in_length_get(&len)); fail_if(len != 2.5); + eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE)); + eo_do(in, ecore_audio_obj_in_remaining_get(&len)); fail_if(len != 2.5); @@ -375,6 +384,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone) eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); fail_if(!ret); + eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_LOOPED, _looped_cb, NULL)); eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, NULL)); ecore_main_loop_begin(); |