From 06e6fa5bf0d8fd714adca83703435e2274ba8698 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sat, 19 Mar 2022 12:25:36 -0400 Subject: Use larger default vox buffer size of 20480 Use larger default vox buffer size of 20480 to improve performance and reduce number of read()/write() system calls --- src/drone.c | 1 - src/spatial.c | 1 - src/vox.c | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/drone.c b/src/drone.c index 4fa9ddb..1fc8424 100644 --- a/src/drone.c +++ b/src/drone.c @@ -94,7 +94,6 @@ xas_drone *xas_drone_new(xas_spatial_scene *scene, } if ((drone->vox = xas_vox_new(scene->format, - XAS_DRONE_VOX_BUFFER_SIZE, XAS_DRONE_VOX_TEXT2WAVE_PATH)) == NULL) { goto error_vox_new; } diff --git a/src/spatial.c b/src/spatial.c index afbcbb7..5978293 100644 --- a/src/spatial.c +++ b/src/spatial.c @@ -586,7 +586,6 @@ xas_spatial_object *xas_spatial_scene_add_vox(xas_spatial_scene *scene, xas_audio_stream *stream; if ((vox = xas_vox_new(scene->format, - scene->buffer->size, text2wave_path)) == NULL) { goto error_vox_new; } diff --git a/src/vox.c b/src/vox.c index 8628288..100ef46 100644 --- a/src/vox.c +++ b/src/vox.c @@ -286,7 +286,6 @@ static xas_object_call_table call_table = { }; xas_vox *xas_vox_new_args(xas_audio_format format, - size_t buffer_size, const char *text2wave_path, int argn, char **args) { @@ -304,7 +303,7 @@ xas_vox *xas_vox_new_args(xas_audio_format format, vox->format.sample_size = format.sample_size; vox->format.sample_rate = format.sample_rate; - vox->buffer_size = buffer_size; + vox->buffer_size = XAS_VOX_DEFAULT_BUFFER_SIZE; vox->gain = XAS_VOX_DEFAULT_GAIN; vox->state = XAS_VOX_IDLE; vox->pid = -1; @@ -326,10 +325,8 @@ error_malloc_vox: } xas_vox *xas_vox_new(xas_audio_format format, - size_t buffer_size, const char *text2wave_path) { return xas_vox_new_args(format, - buffer_size, text2wave_path, 0, NULL); -- cgit v1.2.3