One of the new string handling routines is a wrapper for allocating
memory. This commit changes the rest of the code to take advantage of
that wrapper.
The reason I went to autotools was the multiple sound systems, but since
we are now just using espeak's audio processing we can go back to a more
simple build system.
Most of the idea for this change came from William:
Renamed queue_runner to espeak_thread. Moved espeak initialization
and termination to espeak_thread. The while loops that process
the queue now use the variable should_run.
This adds retry processing back to the queue functions. queue_remove
should only be called after the head entry on the queue is processed
successfully.
Make espeakup a multi-threaded program. One thread reads from the softsynth
device, queuing text and synthesis commands. The other thread processes
items from the queue.
I have added queueing support so that when we read from the softsynth we
can put the text and commands we have read into a queue. This will
allow us to retry calling espeak_synth() if we fill espeak's internal
buffer.