summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-27 01:15:43 -0500
committerXANTRONIX Development2022-02-27 01:15:43 -0500
commit50309ed6bea372b17a154c8a4d4afb53f4b16faf (patch)
tree1d638d093a8f72f3cb78d7a50fb7b5cdb0fd25cf
parent69d3def8de3cb36076aef6e0c6f9b471c545f6d6 (diff)
downloadxas-50309ed6bea372b17a154c8a4d4afb53f4b16faf.tar.gz
xas-50309ed6bea372b17a154c8a4d4afb53f4b16faf.tar.bz2
xas-50309ed6bea372b17a154c8a4d4afb53f4b16faf.zip
Helps when you actually pass the file to be evaled
-rw-r--r--src/vox.c13
1 files changed, 12 insertions, 1 deletions
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;
}