[1.46.10]

Add --version command-line option.

Allow hexadecimal numbers for UTF-8 bytes in rules in *_rules files.

wave_pulse.cpp, ensure wave_close is not called again while waiting.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@278 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2011-12-21 15:43:20 +00:00
parent 0617cc4750
commit 5ac192df81
35 changed files with 2347 additions and 1710 deletions
+19 -9
View File
@@ -60,7 +60,7 @@ static void* say_thread(void*);
static espeak_ERROR push(t_espeak_command* the_command);
static t_espeak_command* pop();
static void init();
static void init(int process_parameters);
static int node_counter=0;
enum {MAX_NODE_COUNTER=400,
INACTIVITY_TIMEOUT=50, // in ms, check that the stream is inactive
@@ -75,7 +75,7 @@ void fifo_init()
// security
pthread_mutex_init( &my_mutex, (const pthread_mutexattr_t *)NULL);
init();
init(0);
assert(-1 != sem_init(&my_sem_start_is_required, 0, 0));
assert(-1 != sem_init(&my_sem_stop_is_acknowledged, 0, 0));
@@ -457,7 +457,7 @@ static void* say_thread(void*)
{
// no mutex required since the stop command is synchronous
// and waiting for my_sem_stop_is_acknowledged
init();
init(1);
// purge start semaphore
SHOW_TIME("say_thread > purge my_sem_start_is_required\n");
@@ -569,14 +569,24 @@ static t_espeak_command* pop()
}
static void init()
static void init(int process_parameters)
{
ENTER("fifo > init");
while (delete_espeak_command( pop() ))
{}
node_counter = 0;
// Changed by Tyler Spivey 30.Nov.2011
t_espeak_command *c = NULL;
ENTER("fifo > init");
c = pop();
while (c != NULL) {
if (process_parameters && (c->type == ET_PARAMETER || c->type == ET_VOICE_NAME || c->type == ET_VOICE_SPEC))
{
process_espeak_command(c);
}
delete_espeak_command(c);
c = pop();
}
node_counter = 0;
}
//>
//<fifo_init
void fifo_terminate()
@@ -589,7 +599,7 @@ void fifo_terminate()
sem_destroy(&my_sem_start_is_required);
sem_destroy(&my_sem_stop_is_acknowledged);
init(); // purge fifo
init(0); // purge fifo
}
#endif