Original patch and commit message courtesy of:
Samuel Thibault <samuel.thibault@ens-lyon.org>
currently espeakup uses daemon() to do the daemonizing stuff.
Unfortunately, daemon() does things not very appropriately, and there
is notably a delay between the parent exit()ing and the child writing
the pid file. The attached patch reimplements it properly, espeakup
then notably plays much more nicely with systemd.
Modified by Chris to apply to master.
This fixes#8.
Use ssml's interpret-as="characters" setting when the kernel reports
just one character. This allows the use of espeak's internationalized
spelling of letters instead of having to maintain spelling ourselves in speakup.
Original patch courtesy of
Samuel Thibault <samuel.thibault@ens-lyon.org>
and modified to work with the current code by Chris.
This fixes#6.
These if statements were executing code if we were not in acsint mode.
They have been combined and the code is now executed when we are in
speakup mode, which is what we want.
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.
This adds a -P or --pid-path option to the command line which
allows the user to change the path and the name of the pid file created
when espeakup is running as a daemon.
I would like to thank Chris Brannon for the original idea for this.
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.
The direct alsa support was experimental and never worked well. It had a
setting which was system specific. Also, I feel that it is better to let
espeak control the audio processing.
It turns out that the install commands need to have the permission
options otherwise the permission of everything that is installed is 755,
which is not correct.
This changes the code to use constants for the parameters to
snd_pcm_set_params. This makes it easier to read the code and to update
the values if needed.
The two variables, stop_requested and runner_must_stop were performing
the same function, so I am using one variable, stop_requested for this
function.
Since there is no reason currently for the softsynth thread to do this,
it makes better sense to have the synth thread control all interaction
with espeak.