diff options
author | XANTRONIX Development | 2022-03-19 12:25:36 -0400 |
---|---|---|
committer | XANTRONIX Development | 2022-03-19 12:25:46 -0400 |
commit | 06e6fa5bf0d8fd714adca83703435e2274ba8698 (patch) | |
tree | 45a038762abf1d58c8208f354fea75c82effee08 /src | |
parent | c48eabffbe6dc192dedad73c86616ba26f7ed6d3 (diff) | |
download | xas-06e6fa5bf0d8fd714adca83703435e2274ba8698.tar.gz xas-06e6fa5bf0d8fd714adca83703435e2274ba8698.tar.bz2 xas-06e6fa5bf0d8fd714adca83703435e2274ba8698.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/drone.c | 1 | ||||
-rw-r--r-- | src/spatial.c | 1 | ||||
-rw-r--r-- | src/vox.c | 5 |
3 files changed, 1 insertions, 6 deletions
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; } @@ -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); |