summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-26 23:43:14 -0500
committerXANTRONIX Development2022-02-26 23:43:22 -0500
commit8c5121eb5f8fd415fb1d0ca61fd7aff9ab084565 (patch)
treed93614b8a02119a6f5ace742739823264e201d34
parent9e6c7b8c46df662a8777742ccb150c1bfff5d421 (diff)
downloadxas-8c5121eb5f8fd415fb1d0ca61fd7aff9ab084565.tar.gz
xas-8c5121eb5f8fd415fb1d0ca61fd7aff9ab084565.tar.bz2
xas-8c5121eb5f8fd415fb1d0ca61fd7aff9ab084565.zip
Implement xas_vox_new_args()
Implement xas_vox_new_args() to allow passing arguments to add when invoking text2wave
-rw-r--r--include/xas/vox.h6
-rw-r--r--src/vox.c12
2 files changed, 13 insertions, 5 deletions
diff --git a/include/xas/vox.h b/include/xas/vox.h
index e2d3e53..c3bae65 100644
--- a/include/xas/vox.h
+++ b/include/xas/vox.h
@@ -33,6 +33,12 @@ typedef struct _xas_vox {
FILE *in;
} xas_vox;
+xas_vox *xas_vox_new_args(xas_audio_format format,
+ size_t buffer_size,
+ const char *text2wave_path,
+ int argn,
+ char **args);
+
xas_vox *xas_vox_new(xas_audio_format format,
size_t buffer_size,
const char *text2wave_path);
diff --git a/src/vox.c b/src/vox.c
index e41fdd7..bf2968b 100644
--- a/src/vox.c
+++ b/src/vox.c
@@ -208,9 +208,11 @@ error_read:
return -1;
}
-xas_vox *xas_vox_new(xas_audio_format format,
- size_t buffer_size,
- const char *text2wave_path) {
+xas_vox *xas_vox_new_args(xas_audio_format format,
+ size_t buffer_size,
+ const char *text2wave_path,
+ int argn,
+ char **args) {
xas_vox *vox;
if ((vox = malloc(sizeof(*vox))) == NULL) {
@@ -230,8 +232,8 @@ xas_vox *xas_vox_new(xas_audio_format format,
vox->stdout = -1;
vox->in = NULL;
- vox->argn = 0;
- vox->args = NULL;
+ vox->argn = argn;
+ vox->args = args;
memset(vox->tmpfile, '\0', sizeof(vox->tmpfile));