fixed stop_speech issue

The stop_speech function needs to test the return code from
espeak_Cancel() to be sure the operation was successful before
signaling the callback to stop the audio.
This commit is contained in:
William Hubbs 2009-06-20 16:17:42 -05:00
commit 1c440e5a42

View file

@ -114,8 +114,12 @@ espeak_ERROR set_volume(struct synth_t * s, int vol, enum adjust_t adj)
espeak_ERROR stop_speech(void)
{
stopped = 1;
return (espeak_Cancel());
espeak_ERROR rc;
rc = espeak_Cancel();
if (rc == EE_OK)
stopped = 1;
return rc;
}
espeak_ERROR speak_text(struct synth_t * s)