aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c256
1 files changed, 130 insertions, 126 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 4be231c39c..174b0718cd 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -36,7 +36,7 @@ static Eina_Bool _finished_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const
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));
+ eo_do(obj, ecore_audio_obj_in_looped_set(obj, EINA_FALSE));
return EINA_TRUE;
}
@@ -49,10 +49,10 @@ _seek_vol(void *data)
Eo *in = data;
Eo *out = NULL;
- eo_do(in, out = ecore_audio_obj_in_output_get());
+ eo_do(in, out = ecore_audio_obj_in_output_get(in));
- eo_do(out, ecore_audio_obj_volume_set(0.4));
- eo_do(in, len = ecore_audio_obj_in_seek(-0.3, SEEK_END));
+ eo_do(out, ecore_audio_obj_volume_set(out, 0.4));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, -0.3, SEEK_END));
fail_if(len < 0);
return EINA_FALSE;
@@ -64,22 +64,22 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
Eina_Bool ret = EINA_FALSE;
Eina_Bool pulse_context_failed = EINA_FALSE;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ eo_add(in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
- eo_do(in, ecore_audio_obj_name_set("modem.wav"));
- eo_do(in, ret = ecore_audio_obj_source_set(TESTS_SRC_DIR"/modem.wav"));
+ eo_do(in, ecore_audio_obj_name_set(in, "modem.wav"));
+ eo_do(in, ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav"));
fail_if(!ret);
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
+ eo_add(out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
fail_if(!out);
ecore_timer_add(0.3, _seek_vol, in);
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
- eo_do(out, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed));
+ eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
+ eo_do(out, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed));
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
fail_if(!ret);
ecore_main_loop_begin();
@@ -114,19 +114,19 @@ START_TEST(ecore_test_ecore_audio_cleanup)
int freq = 1000;
Eina_Bool ret = EINA_FALSE;
- in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ eo_add(in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
- eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
- eo_do(in, ecore_audio_obj_in_length_set(2));
+ eo_do(in, eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
+ eo_do(in, ecore_audio_obj_in_length_set(in, 2));
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
- eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_OGG));
+ eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG));
fail_if(!ret);
- eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.ogg"));
+ eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.ogg"));
fail_if(!ret);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
fail_if(!ret);
ecore_idler_add(_idle_del, in);
@@ -145,78 +145,78 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
Eina_Bool ret;
char *tmp;
- in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ eo_add(in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
- eo_do(in, ecore_audio_obj_name_set("tone"));
+ eo_do(in, ecore_audio_obj_name_set(in, "tone"));
- eo_do(in, channel = ecore_audio_obj_in_channels_get());
+ eo_do(in, channel = ecore_audio_obj_in_channels_get(in));
fail_if(channel != 1);
- eo_do(in, rate = ecore_audio_obj_in_samplerate_get());
+ eo_do(in, rate = ecore_audio_obj_in_samplerate_get(in));
fail_if(rate != 44100);
- eo_do(in, len = ecore_audio_obj_in_length_get());
+ eo_do(in, len = ecore_audio_obj_in_length_get(in));
fail_if(len != 1);
- eo_do(in, ecore_audio_obj_in_length_set(2.5));
- eo_do(in, len = ecore_audio_obj_in_length_get());
+ eo_do(in, ecore_audio_obj_in_length_set(in, 2.5));
+ eo_do(in, len = ecore_audio_obj_in_length_get(in));
fail_if(len != 2.5);
- eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
+ eo_do(in, ecore_audio_obj_in_looped_set(in, EINA_TRUE));
- eo_do(in, len = ecore_audio_obj_in_remaining_get());
+ eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
fail_if(len != 2.5);
- eo_do(in, freq = (intptr_t) eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ));
+ eo_do(in, freq = (intptr_t) eo_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ));
fail_if(freq != 1000);
freq = 2000;
- eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
+ eo_do(in, eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
- eo_do(in, freq = (intptr_t) eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ));
+ eo_do(in, freq = (intptr_t) eo_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ));
fail_if(freq != 2000);
- eo_do(in, eo_key_data_set("foo", "bar"));
- eo_do(in, tmp = eo_key_data_get("foo"));
+ eo_do(in, eo_key_data_set(in, "foo", "bar"));
+ eo_do(in, tmp = eo_key_data_get(in, "foo"));
ck_assert_str_eq(tmp, "bar");
- eo_do(in, len = ecore_audio_obj_in_seek(5.0, SEEK_SET));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 5.0, SEEK_SET));
fail_if(len != -1);
- eo_do(in, len = ecore_audio_obj_in_seek(1.0, 42));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, 42));
fail_if(len != -1);
- eo_do(in, len = ecore_audio_obj_in_seek(1.0, SEEK_SET));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, SEEK_SET));
fail_if(len != 1.0);
- eo_do(in, len = ecore_audio_obj_in_remaining_get());
+ eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
fail_if(len != 1.5);
- eo_do(in, len = ecore_audio_obj_in_seek(1.0, SEEK_CUR));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR));
fail_if(len != 2.0);
- eo_do(in, len = ecore_audio_obj_in_remaining_get());
+ eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
fail_if(len != 0.5);
- eo_do(in, len = ecore_audio_obj_in_seek(-1.0, SEEK_END));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END));
fail_if(len != 1.5);
- eo_do(in, len = ecore_audio_obj_in_remaining_get());
+ eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
fail_if(len != 1.0);
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
- eo_do(out, ecore_audio_obj_name_set("tmp.wav"));
- eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV));
+ eo_do(out, ecore_audio_obj_name_set(out, "tmp.wav"));
+ eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV));
fail_if(!ret);
- eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav"));
+ eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav"));
fail_if(!ret);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
fail_if(!ret);
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_LOOPED, _looped_cb, NULL));
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
+ eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_LOOPED, _looped_cb, NULL));
+ eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
ecore_main_loop_begin();
@@ -237,76 +237,76 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
Ecore_Audio_Format fmt;
const char *src;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ eo_add(in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
- eo_do(in, fmt = ecore_audio_obj_format_get());
+ eo_do(in, fmt = ecore_audio_obj_format_get(in));
fail_if(fmt != ECORE_AUDIO_FORMAT_AUTO);
- eo_do(in, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_FLAC));
+ eo_do(in, ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_FLAC));
fail_if(!ret);
- eo_do(in, fmt = ecore_audio_obj_format_get());
+ eo_do(in, fmt = ecore_audio_obj_format_get(in));
fail_if(fmt != ECORE_AUDIO_FORMAT_FLAC);
- eo_do(in, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_AUTO));
+ eo_do(in, ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO));
fail_if(!ret);
- eo_do(in, ecore_audio_obj_name_set("sms.ogg"));
- eo_do(in, ret = ecore_audio_obj_source_set(TESTS_SRC_DIR"/sms.ogg"));
+ eo_do(in, ecore_audio_obj_name_set(in, "sms.ogg"));
+ eo_do(in, ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sms.ogg"));
fail_if(!ret);
- eo_do(in, src = ecore_audio_obj_source_get());
+ eo_do(in, src = ecore_audio_obj_source_get(in));
ck_assert_str_eq(src, TESTS_SRC_DIR"/sms.ogg");
- eo_do(in, fmt = ecore_audio_obj_format_get());
+ eo_do(in, fmt = ecore_audio_obj_format_get(in));
fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
- eo_do(in, channel = ecore_audio_obj_in_channels_get());
+ eo_do(in, channel = ecore_audio_obj_in_channels_get(in));
fail_if(channel != 2);
- eo_do(in, rate = ecore_audio_obj_in_samplerate_get());
+ eo_do(in, rate = ecore_audio_obj_in_samplerate_get(in));
fail_if(rate != 44100);
- eo_do(in, len = ecore_audio_obj_in_length_get());
+ eo_do(in, len = ecore_audio_obj_in_length_get(in));
fail_if(len == 0);
- eo_do(in, rem = ecore_audio_obj_in_remaining_get());
+ eo_do(in, rem = ecore_audio_obj_in_remaining_get(in));
fail_if(len != rem);
- eo_do(in, fmt = ecore_audio_obj_format_get());
+ eo_do(in, fmt = ecore_audio_obj_format_get(in));
fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
- eo_do(in, len = ecore_audio_obj_in_seek(0.5, SEEK_SET));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET));
fail_if(len != 0.5);
- eo_do(in, len = ecore_audio_obj_in_seek(0.5, SEEK_CUR));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, 0.5, SEEK_CUR));
fail_if(len != 1.0);
- eo_do(in, len = ecore_audio_obj_in_seek(-1.0, SEEK_END));
+ eo_do(in, len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END));
fail_if(fabs(rem - 1 - len) > 0.1);
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
- eo_do(out, ecore_audio_obj_name_set("tmp.wav"));
- eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV));
+ eo_do(out, ecore_audio_obj_name_set(out, "tmp.wav"));
+ eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV));
fail_if(!ret);
- eo_do(out, fmt = ecore_audio_obj_format_get());
+ eo_do(out, fmt = ecore_audio_obj_format_get(out));
fail_if(fmt != ECORE_AUDIO_FORMAT_WAV);
// eo_do(out, ret = ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav"));
// fail_if(ret);
- eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav"));
+ eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav"));
fail_if(!ret);
- eo_do(out, src = ecore_audio_obj_source_get());
+ eo_do(out, src = ecore_audio_obj_source_get(out));
ck_assert_str_eq(src, TESTS_BUILD_DIR"/tmp.wav");
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
fail_if(!ret);
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
+ eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
ecore_main_loop_begin();
@@ -324,55 +324,58 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
Eina_List *in3;
Eina_Bool attached;
- Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
- Eo *in2 = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
- Eo *out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ Eo *in;
+ eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in2;
+ eo_add(in2, ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *out;
+ eo_add(out, ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!in);
fail_if(!in2);
fail_if(!out);
- eo_do(in, out2 = ecore_audio_obj_in_output_get());
+ eo_do(in, out2 = ecore_audio_obj_in_output_get(in));
fail_if(out2);
- eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
+ eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));
fail_if(eina_list_count(in3) != 0);
- eo_do(out, attached = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in));
fail_if(!attached);
- eo_do(out, attached = ecore_audio_obj_out_input_attach(in));
+ eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in));
fail_if(attached);
- eo_do(in, out2 = ecore_audio_obj_in_output_get());
+ eo_do(in, out2 = ecore_audio_obj_in_output_get(in));
fail_if(out2 != out);
- eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
+ eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));
fail_if(eina_list_count(in3) != 1);
fail_if(eina_list_data_get(in3) != in);
- eo_do(out, attached = ecore_audio_obj_out_input_attach(in2));
+ eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in2));
fail_if(!attached);
- eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
+ eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));
fail_if(eina_list_count(in3) != 2);
fail_if(eina_list_data_get(in3) != in);
eo_del(in2);
- eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
+ eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));
fail_if(eina_list_count(in3) != 1);
fail_if(eina_list_data_get(in3) != in);
eo_del(out);
- eo_do(in, out2 = ecore_audio_obj_in_output_get());
+ eo_do(in, out2 = ecore_audio_obj_in_output_get(in));
fail_if(out2);
@@ -422,16 +425,16 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
{
Eo *in, *out;
- in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
- out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ eo_add(out, ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!out);
- eo_do(in, ecore_audio_obj_vio_set(&in_vio, NULL, NULL));
- eo_do(out, ecore_audio_obj_vio_set(&out_vio, NULL, NULL));
+ eo_do(in, ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL));
+ eo_do(out, ecore_audio_obj_vio_set(out, &out_vio, NULL, NULL));
- eo_do(out, ecore_audio_obj_out_input_attach(in));
+ eo_do(out, ecore_audio_obj_out_input_attach(out, in));
ecore_main_loop_begin();
@@ -460,75 +463,76 @@ START_TEST(ecore_test_ecore_audio_obj_in)
Ecore_Audio_Vio vio;
Eina_Bool freed = EINA_FALSE;
- Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in;
+ eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
- eo_do(in, ecore_audio_obj_vio_set(&vio, &freed, _myfree));
+ eo_do(in, ecore_audio_obj_vio_set(in, &vio, &freed, _myfree));
fail_if(freed);
- eo_do(in, ecore_audio_obj_vio_set(NULL, NULL, NULL));
+ eo_do(in, ecore_audio_obj_vio_set(in, NULL, NULL, NULL));
fail_if(!freed);
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
+ eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
fail_if(speed != 1.0);
- eo_do(in, ecore_audio_obj_in_speed_set(2.5));
+ eo_do(in, ecore_audio_obj_in_speed_set(in, 2.5));
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
+ eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
fail_if(speed != 2.5);
- eo_do(in, ecore_audio_obj_in_speed_set(0));
+ eo_do(in, ecore_audio_obj_in_speed_set(in, 0));
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
+ eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
fail_if(speed != 0.2);
- eo_do(in, ecore_audio_obj_in_speed_set(10));
+ eo_do(in, ecore_audio_obj_in_speed_set(in, 10));
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
+ eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
fail_if(speed != 5.0);
- eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get());
+ eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get(in));
fail_if(samplerate != 0);
- eo_do(in, ecore_audio_obj_in_samplerate_set(1234));
+ eo_do(in, ecore_audio_obj_in_samplerate_set(in, 1234));
- eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get());
+ eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get(in));
fail_if(samplerate != 1234);
- eo_do(in, channels = ecore_audio_obj_in_channels_get());
+ eo_do(in, channels = ecore_audio_obj_in_channels_get(in));
fail_if(channels != 0);
- eo_do(in, ecore_audio_obj_in_channels_set(2));
+ eo_do(in, ecore_audio_obj_in_channels_set(in, 2));
- eo_do(in, channels = ecore_audio_obj_in_channels_get());
+ eo_do(in, channels = ecore_audio_obj_in_channels_get(in));
fail_if(channels != 2);
- eo_do(in, looped = ecore_audio_obj_in_looped_get());
+ eo_do(in, looped = ecore_audio_obj_in_looped_get(in));
fail_if(looped);
- eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
+ eo_do(in, ecore_audio_obj_in_looped_set(in, EINA_TRUE));
- eo_do(in, looped = ecore_audio_obj_in_looped_get());
+ eo_do(in, looped = ecore_audio_obj_in_looped_get(in));
fail_if(!looped);
- eo_do(in, length = ecore_audio_obj_in_length_get());
+ eo_do(in, length = ecore_audio_obj_in_length_get(in));
fail_if(length != 0);
- eo_do(in, length = ecore_audio_obj_in_remaining_get());
+ eo_do(in, length = ecore_audio_obj_in_remaining_get(in));
fail_if(length != -1);
memset(buf, 0xaa, 10);
- eo_do(in, read = ecore_audio_obj_in_read(buf, 10));
+ eo_do(in, read = ecore_audio_obj_in_read(in, buf, 10));
fail_if(read != 0);
for (i=0; i<10; i++) {
fail_if(buf[i] != 0xaa);
}
- eo_do(in, ecore_audio_obj_paused_set(EINA_TRUE));
+ eo_do(in, ecore_audio_obj_paused_set(in, EINA_TRUE));
- eo_do(in, read = ecore_audio_obj_in_read(buf, 10));
+ eo_do(in, read = ecore_audio_obj_in_read(in, buf, 10));
fail_if(read != 10);
for (i=0; i<10; i++) {
@@ -547,10 +551,10 @@ START_TEST(ecore_test_ecore_audio_obj)
double volume;
Eo *objs[2], *obj;
- objs[0] = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ eo_add(objs[0], ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!objs[0]);
- objs[1] = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ eo_add(objs[1], ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!objs[1]);
for (i=0; i<2; i++) {
@@ -558,29 +562,29 @@ START_TEST(ecore_test_ecore_audio_obj)
fail_if(!obj);
- eo_do(obj, name = ecore_audio_obj_name_get());
+ eo_do(obj, name = ecore_audio_obj_name_get(obj));
fail_if(name);
- eo_do(obj, ecore_audio_obj_name_set("In1"));
- eo_do(obj, name = ecore_audio_obj_name_get());
+ eo_do(obj, ecore_audio_obj_name_set(obj, "In1"));
+ eo_do(obj, name = ecore_audio_obj_name_get(obj));
ck_assert_str_eq(name, "In1");
- eo_do(obj, ecore_audio_obj_name_get());
+ eo_do(obj, ecore_audio_obj_name_get(obj));
- eo_do(obj, paused = ecore_audio_obj_paused_get());
+ eo_do(obj, paused = ecore_audio_obj_paused_get(obj));
fail_if(paused);
- eo_do(obj, ecore_audio_obj_paused_set(EINA_TRUE));
- eo_do(obj, paused = ecore_audio_obj_paused_get());
+ eo_do(obj, ecore_audio_obj_paused_set(obj, EINA_TRUE));
+ eo_do(obj, paused = ecore_audio_obj_paused_get(obj));
fail_if(!paused);
- eo_do(obj, volume = ecore_audio_obj_volume_get());
+ eo_do(obj, volume = ecore_audio_obj_volume_get(obj));
fail_if(volume != 1.0);
- eo_do(obj, ecore_audio_obj_volume_set(0.5));
- eo_do(obj, volume = ecore_audio_obj_volume_get());
+ eo_do(obj, ecore_audio_obj_volume_set(obj, 0.5));
+ eo_do(obj, volume = ecore_audio_obj_volume_get(obj));
fail_if(volume != 0.5);
eo_del(obj);