From 50309ed6bea372b17a154c8a4d4afb53f4b16faf Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 27 Feb 2022 01:15:43 -0500 Subject: Helps when you actually pass the file to be evaled --- src/vox.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vox.c b/src/vox.c index 475300d..5cfc9d0 100644 --- a/src/vox.c +++ b/src/vox.c @@ -114,9 +114,13 @@ static int vox_start(xas_vox *vox) { "-", "-o", "-", + NULL, + NULL, NULL }; + int argn = 6; + int argc; char **argv; @@ -124,7 +128,14 @@ static int vox_start(xas_vox *vox) { snprintf(sample_rate, sizeof(sample_rate)-1, "%zu", vox->format.sample_rate); - if ((argv = args_concat(6, args, vox->argn, vox->args, &argc)) == NULL) { + if (vox->tmpfile[0] && vox->tmpfd > 0) { + args[6] = "-eval"; + args[7] = vox->tmpfile; + + argn += 2; + } + + if ((argv = args_concat(argn, args, vox->argn, vox->args, &argc)) == NULL) { goto error_child; } -- cgit v1.2.3