mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-04 15:49:48 +00:00
issue 172: fix sluggish speech for stopped speech.
This restores the behaviour removed in commit
ca831d236a.
When using eSpeak for audio and eSpeak in a server, using the async
speech requests, that code stopped the audio as soon as possible
from a cancel request. This allows servers like brltty to be more
responsive.
This commit is contained in:
@@ -81,6 +81,15 @@ int (*phoneme_callback)(const char *) = NULL;
|
||||
char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
|
||||
extern int saved_parameters[N_SPEECH_PARAM]; // Parameters saved on synthesis start
|
||||
|
||||
void close_audio(void)
|
||||
{
|
||||
#ifdef HAVE_PCAUDIOLIB_AUDIO_H
|
||||
if ((my_mode & ENOUTPUT_MODE_SPEAK_AUDIO) == ENOUTPUT_MODE_SPEAK_AUDIO) {
|
||||
audio_object_close(my_audio);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int dispatch_audio(short *outbuf, int length, espeak_EVENT *event)
|
||||
{
|
||||
int a_wave_can_be_played = 1;
|
||||
|
||||
Reference in New Issue
Block a user