forked from enlightenment/efl
Eo2: Fix other forgotten ret.
This commit is contained in:
parent
d03ecb0f3d
commit
03b99d58b2
|
@ -70,7 +70,7 @@ main(int argc, const char *argv[])
|
||||||
eo_do(in, ecore_audio_obj_volume_set(0.7));
|
eo_do(in, ecore_audio_obj_volume_set(0.7));
|
||||||
eo_do(in, ecore_audio_obj_vio_set(&vio, NULL, NULL));
|
eo_do(in, ecore_audio_obj_vio_set(&vio, NULL, NULL));
|
||||||
|
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("Could not attach input");
|
printf("Could not attach input");
|
||||||
goto end;
|
goto end;
|
||||||
|
|
|
@ -53,7 +53,7 @@ handle_cmd(char *cmd, size_t bread)
|
||||||
else if (!strncmp(cmd, "n", bread))
|
else if (!strncmp(cmd, "n", bread))
|
||||||
{
|
{
|
||||||
in = eina_list_data_get(out_inputs);
|
in = eina_list_data_get(out_inputs);
|
||||||
eo_do(out, ecore_audio_obj_out_input_detach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_detach(in));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printf("Could not detach input\n");
|
printf("Could not detach input\n");
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ handle_cmd(char *cmd, size_t bread)
|
||||||
ecore_audio_obj_in_length_get(&length));
|
ecore_audio_obj_in_length_get(&length));
|
||||||
|
|
||||||
printf("Start: %s (%0.2fs)\n", name, length);
|
printf("Start: %s (%0.2fs)\n", name, length);
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printf("Could not attach input %s\n", name);
|
printf("Could not attach input %s\n", name);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ handle_cmd(char *cmd, size_t bread)
|
||||||
ecore_audio_obj_in_length_get(&length));
|
ecore_audio_obj_in_length_get(&length));
|
||||||
|
|
||||||
printf("Start: %s (%0.2fs)\n", name, length);
|
printf("Start: %s (%0.2fs)\n", name, length);
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printf("Could not attach input %s\n", name);
|
printf("Could not attach input %s\n", name);
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, Eo *in, const Eo_Event_D
|
||||||
printf("Done: %s\n", name);
|
printf("Done: %s\n", name);
|
||||||
|
|
||||||
inputs = eina_list_remove(inputs, in);
|
inputs = eina_list_remove(inputs, in);
|
||||||
eo_do(out, ecore_audio_obj_out_input_detach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_detach(in));
|
||||||
eo_del(in);
|
eo_del(in);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -214,7 +214,7 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, Eo *in, const Eo_Event_D
|
||||||
|
|
||||||
eo_do(in, ecore_audio_obj_name_get(&name));
|
eo_do(in, ecore_audio_obj_name_get(&name));
|
||||||
printf("Start: %s\n", name);
|
printf("Start: %s\n", name);
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printf("Could not attach input %s\n", name);
|
printf("Could not attach input %s\n", name);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ main(int argc, const char *argv[])
|
||||||
tmp = strdup(argv[i]);
|
tmp = strdup(argv[i]);
|
||||||
eo_do(in, ecore_audio_obj_name_set(basename(tmp)));
|
eo_do(in, ecore_audio_obj_name_set(basename(tmp)));
|
||||||
free(tmp);
|
free(tmp);
|
||||||
eo_do(in, ecore_audio_obj_source_set(argv[i], &ret));
|
eo_do(in, ret = ecore_audio_obj_source_set(argv[i]));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("Could not set %s as input\n", argv[i]);
|
printf("Could not set %s as input\n", argv[i]);
|
||||||
continue;
|
continue;
|
||||||
|
@ -308,7 +308,7 @@ main(int argc, const char *argv[])
|
||||||
printf("Start: %s (%0.2fs)\n", name, length);
|
printf("Start: %s (%0.2fs)\n", name, length);
|
||||||
|
|
||||||
out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
|
out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
printf("Could not attach input %s\n", name);
|
printf("Could not attach input %s\n", name);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
|
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
|
||||||
eo_do(in, ecore_audio_obj_name_set(basename(argv[1])));
|
eo_do(in, ecore_audio_obj_name_set(basename(argv[1])));
|
||||||
eo_do(in, ecore_audio_obj_source_set(argv[1], &ret));
|
eo_do(in, ret = ecore_audio_obj_source_set(argv[1]));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("Could not set %s as input\n", argv[1]);
|
printf("Could not set %s as input\n", argv[1]);
|
||||||
eo_del(in);
|
eo_del(in);
|
||||||
|
@ -61,7 +61,7 @@ main(int argc, char *argv[])
|
||||||
eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL));
|
eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL));
|
||||||
|
|
||||||
out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
|
out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
|
||||||
eo_do(out, ecore_audio_obj_source_set(argv[2], &ret));
|
eo_do(out, ret = ecore_audio_obj_source_set(argv[2]));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("Could not set %s as output\n", argv[2]);
|
printf("Could not set %s as output\n", argv[2]);
|
||||||
eo_del(in);
|
eo_del(in);
|
||||||
|
@ -69,7 +69,7 @@ main(int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
|
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printf("Could not attach input\n");
|
printf("Could not attach input\n");
|
||||||
eo_del(out);
|
eo_del(out);
|
||||||
|
|
|
@ -294,7 +294,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
|
||||||
fail_if(fmt != ECORE_AUDIO_FORMAT_WAV);
|
fail_if(fmt != ECORE_AUDIO_FORMAT_WAV);
|
||||||
|
|
||||||
|
|
||||||
// eo_do(out, ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav", &ret));
|
// eo_do(out, ret = ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav"));
|
||||||
// fail_if(ret);
|
// 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(TESTS_BUILD_DIR"/tmp.wav"));
|
||||||
|
|
Loading…
Reference in New Issue