mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-02 06:42:10 +00:00
Stop audio output before fifo_stop is called
This allows process_espeak_command to stop as soon as possible Using emacspeak server with espeak-ng (still not published) found that audio was only being stoped after a command is processed (i.e. using pcaudiolib). This fixes this issue.
This commit is contained in:
@@ -799,15 +799,16 @@ ESPEAK_API const char *espeak_TextToPhonemes(const void **textptr, int textmode,
|
||||
|
||||
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_flush(my_audio);
|
||||
#endif
|
||||
|
||||
#ifdef USE_ASYNC
|
||||
fifo_stop();
|
||||
event_clear_all();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PCAUDIOLIB_AUDIO_H
|
||||
if ((my_mode & ENOUTPUT_MODE_SPEAK_AUDIO) == ENOUTPUT_MODE_SPEAK_AUDIO)
|
||||
audio_object_flush(my_audio);
|
||||
#endif
|
||||
embedded_value[EMBED_T] = 0; // reset echo for pronunciation announcements
|
||||
|
||||
for (int i = 0; i < N_SPEECH_PARAM; i++)
|
||||
|
||||
Reference in New Issue
Block a user