examples/ecore_audio: Require input and output file as argument

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
Daniel Willmann 2013-04-23 17:11:48 +01:00
parent 97d4b50c91
commit 029fc6ec2a
1 changed files with 4 additions and 4 deletions

View File

@ -39,9 +39,9 @@ main(int argc, char *argv[])
Eo *in;
Eina_Bool ret;
if (argc < 2)
if (argc < 3)
{
printf("Please provide a filename\n");
printf("Usage: ./example <infile> <outfile>\n");
exit(EXIT_FAILURE);
}
@ -61,9 +61,9 @@ main(int argc, char *argv[])
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);
eo_do(out, ecore_audio_obj_source_set("foo.ogg", &ret));
eo_do(out, ecore_audio_obj_source_set(argv[2], &ret));
if (!ret) {
printf("Could not set %s as output\n", "foo.ogg");
printf("Could not set %s as output\n", argv[2]);
eo_del(in);
eo_del(out);
return 1;