Browse Source

Fix the logic from commit 3343bb45b6 that caused the end of the speech to be clipped.

master
Reece H. Dunn 9 years ago
parent
commit
a8eb65ee61
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      src/libespeak-ng/event.c

+ 5
- 5
src/libespeak-ng/event.c View File

return EINVAL; return EINVAL;


espeak_ng_STATUS status; 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; return status;
}


espeak_EVENT *a_event = event_copy(event); espeak_EVENT *a_event = event_copy(event);
if ((status = push(a_event)) != ENS_OK) { if ((status = push(a_event)) != ENS_OK) {
event_delete(a_event); event_delete(a_event);
pthread_mutex_unlock(&my_mutex); 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); sem_post(&my_sem_start_is_required);



Loading…
Cancel
Save