From e7cc1aeb86e37cd55bb010a7ee26db39111db494 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 7 Mar 2022 11:56:31 -0500 Subject: Do not fill buffers when speech output is complete --- src/vox.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vox.c b/src/vox.c index 9d3d098..d98a81d 100644 --- a/src/vox.c +++ b/src/vox.c @@ -200,9 +200,7 @@ static ssize_t vox_fill(xas_vox *vox, readcount; if (vox->state != XAS_VOX_ACTIVE) { - xas_audio_zero(vox->format, samples, 0, count); - - return count; + return 0; } if ((readlen = read(vox->stdout, @@ -225,9 +223,7 @@ static ssize_t vox_fill(xas_vox *vox, readcount); } - xas_audio_zero(vox->format, samples, readcount, count-readcount); - - return count; + return readcount; error_read: return -1; -- cgit v1.2.3