From ceaae3640a51fad408386f27bb30fe2063cdf58e Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 29 Jun 2009 15:59:55 -0500 Subject: [PATCH] audio should be stopped in softsynth_thread not espeak_thread --- softsynth.c | 1 + synth.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/softsynth.c b/softsynth.c index 96d0aca..4ccb087 100644 --- a/softsynth.c +++ b/softsynth.c @@ -170,6 +170,7 @@ static void process_buffer(struct synth_t *s, char *buf, ssize_t length) static void request_espeak_stop(void) { pthread_mutex_lock(&queue_guard); + stop_audio(); runner_must_stop = 1; pthread_cond_signal(&runner_awake); /* Wake runner, if necessary. */ while(should_run && (runner_must_stop == 1)) diff --git a/synth.c b/synth.c index e454ed4..9d77ffa 100644 --- a/synth.c +++ b/synth.c @@ -129,7 +129,6 @@ static espeak_ERROR stop_speech(void) { espeak_ERROR rc; - stop_audio(); rc = espeak_Cancel(); start_audio(&user_data); return rc;