summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}