From c9f871f687c6bd6ef1a562000c53c6762cfa7205 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 29 Jun 2009 15:26:48 -0500 Subject: [PATCH] see if we need to silence speech before we process the queue --- synth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/synth.c b/synth.c index f77960e..e454ed4 100644 --- a/synth.c +++ b/synth.c @@ -268,17 +268,17 @@ void *espeak_thread(void *arg) while (should_run && !queue_peek() && !runner_must_stop) pthread_cond_wait(&runner_awake, &queue_guard); - while (should_run && queue_peek() && !runner_must_stop) { - queue_process_entry(s); - pthread_mutex_lock(&queue_guard); - } - if (runner_must_stop) { queue_clear(); stop_speech(); runner_must_stop = 0; pthread_cond_signal(&stop_acknowledged); } + + while (should_run && queue_peek() && !runner_must_stop) { + queue_process_entry(s); + pthread_mutex_lock(&queue_guard); + } } pthread_cond_signal(&stop_acknowledged); pthread_mutex_unlock(&queue_guard);