From 963875057995b992b56b6a27126bd5d4183cfcf8 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Wed, 22 Aug 2018 07:42:27 +0100 Subject: [PATCH] Always flush stdout when reading stdin line by line. --- src/espeak-ng.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/espeak-ng.c b/src/espeak-ng.c index 5d8a8a73..812397fe 100644 --- a/src/espeak-ng.c +++ b/src/espeak-ng.c @@ -691,6 +691,8 @@ int main(int argc, char **argv) while (fgets(p_text, max, f_text) != NULL) { p_text[max-1] = 0; espeak_Synth(p_text, max, 0, POS_CHARACTER, 0, synth_flags, NULL, NULL); + // Allow subprocesses to use the audio data through pipes. + fflush(stdout); } if (f_text != stdin) { fclose(f_text);