mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
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:
parent
08e46c58a8
commit
1c440e5a42
1 changed files with 6 additions and 2 deletions
8
synth.c
8
synth.c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue