espeak_ng_Cancel(): discard the audio, don't close the device!

This function should just discard the currently playing audio,
rather than close the audio device.  After all,
we will probably want to synthesize something else later.
This commit is contained in:
Christopher Brannon
2016-07-18 07:45:44 -07:00
parent 11b1a7b30c
commit 3ed0b5cd0f
+1 -1
View File
@@ -810,7 +810,7 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_Cancel(void)
#ifdef HAVE_PCAUDIOLIB_AUDIO_H
if ((my_mode & ENOUTPUT_MODE_SPEAK_AUDIO) == ENOUTPUT_MODE_SPEAK_AUDIO)
audio_object_close(my_audio);
audio_object_flush(my_audio);
#endif
embedded_value[EMBED_T] = 0; // reset echo for pronunciation announcements