mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
Fix the logic from commit 3343bb45b6 that caused the end of the speech to be clipped.
This commit is contained in:
@@ -203,17 +203,17 @@ espeak_ng_STATUS event_declare(espeak_EVENT *event)
|
||||
return EINVAL;
|
||||
|
||||
espeak_ng_STATUS status;
|
||||
if ((status = pthread_mutex_lock(&my_mutex)) != ENS_OK)
|
||||
if ((status = pthread_mutex_lock(&my_mutex)) != ENS_OK) {
|
||||
sem_post(&my_sem_start_is_required);
|
||||
return status;
|
||||
}
|
||||
|
||||
espeak_EVENT *a_event = event_copy(event);
|
||||
if ((status = push(a_event)) != ENS_OK) {
|
||||
event_delete(a_event);
|
||||
pthread_mutex_unlock(&my_mutex);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = pthread_mutex_lock(&my_mutex);
|
||||
} else
|
||||
status = pthread_mutex_unlock(&my_mutex);
|
||||
|
||||
sem_post(&my_sem_start_is_required);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user