William Hubbs
0d9d7b6141
update readme
2010-05-04 23:17:53 -05:00
William Hubbs
056dcf70fe
convert to autotools
2010-05-04 22:55:13 -05:00
William Hubbs
d1630432ba
re-organized the makefile.
2009-10-10 12:04:41 -05:00
William Hubbs
8fda956e02
fixed permissions in makefile
...
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.
2009-10-09 11:20:17 -05:00
William Hubbs
4cfcd7ba11
fixed mandir
...
the mandir variable in the makefile should point only to the top level
of the man tree.
2009-10-09 11:10:49 -05:00
William Hubbs
1a10788c5f
lowered latency setting to 1/40 of a second.
2009-10-09 11:09:20 -05:00
William Hubbs
edb5e50fcd
make alsa code more readable
...
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.
2009-10-09 08:56:58 -05:00
William Hubbs
dec561324d
updates to alsa support
...
After studying pcm_min.c in the alsa library git repository, I updated
the alsa support to be similar to what I saw there.
2009-10-08 17:46:39 -05:00
William Hubbs
486fe27f47
removed permission settings from makefile
2009-10-07 15:59:12 -05:00
William Hubbs
311b691195
fix makefile to not define variables if they are already defined
2009-10-07 15:55:46 -05:00
William Hubbs
ffe397fb91
removed the minimum function
...
This function really wasn't needed. I also attempted to make the
callback functionn more like the test code in the alsa library git
repository.
2009-10-01 14:15:43 -05:00
William Hubbs
e66311bb99
added automatic dependency tracking to the Makefile
2009-09-23 15:44:51 -05:00
William Hubbs
11cc053d82
reworked the makefile
...
This version of the makefile should be more compatible with allowing
users to pass in cflags.
2009-09-07 16:57:00 -05:00
William Hubbs
48fa03faf5
renamed espeak_sound.c to portaudio.c
...
This better describes the sound system that espeak uses natively.
2009-09-05 11:32:22 -05:00
William Hubbs
654fc810fe
default prefix to /usr/local
...
Without packaging, we should be installing espeakup in /usr/local.
2009-08-25 18:22:40 -05:00
William Hubbs
e4e3f0979e
the status handle should be static
2009-08-21 13:03:02 -05:00
William Hubbs
57547e8efa
renamed synth.c to espeak.c
...
The name was changed because it describes the function of this code more
accurately.
2009-08-19 15:14:20 -05:00
William Hubbs
ac9e12414b
made stop_requested a global variable
...
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.
2009-07-01 20:16:29 -05:00
William Hubbs
18ebab3247
indentation fixes
2009-07-01 19:04:01 -05:00
William Hubbs
cc7e77eb9d
move stop_audio call to synth thread
...
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.
2009-07-01 13:01:41 -05:00
William Hubbs
32d848cb76
make callback honor should_run
...
The callback should return and abort synthesis if should_run is 0. This
fixes slow shutdown times in alsa mode.
2009-07-01 12:22:14 -05:00
William Hubbs
4de82bf24c
added a couple of #defines to the alsa code
2009-06-30 21:32:52 -05:00
William Hubbs
739e074072
reworked the queue_remove function
...
Now, when queue_remove is called, it returns the pointer to the data of
the first entry in the queue and removes the entry.
2009-06-30 20:15:20 -05:00
William Hubbs
014d27b7aa
removed some unlock_audio_mutex() calls
2009-06-30 19:15:44 -05:00
William Hubbs
82490a98d2
call snd_pcm_prepare after snd_pcm_drop in stop_audio
2009-06-30 15:54:52 -05:00
William Hubbs
101e14901e
removed white space in the makefile
2009-06-30 13:21:52 -05:00
William Hubbs
dc056e6c77
broke the queue definitions out into their own header file
2009-06-30 13:08:07 -05:00
William Hubbs
0a9a8cce9b
small style changes
2009-06-30 08:15:27 -05:00
Christopher Brannon
40479540b4
Fix a memory leak.
...
If we fail to add entries to the queue in queue_add_cmd or
queue_add_text, properly free the entry.
2009-06-29 18:42:25 -05:00
William Hubbs
ccb8cea91e
stop speech before clearing the queue
...
Thanks to Kirk Reiser for pointing out that this makes the cancel
response faster.
2009-06-29 18:12:04 -05:00
Christopher Brannon
31ad5f04ca
Completely data-agnostic queue functions.
...
The functions in queue.c no longer use static variables. We can now use
them for multiple queues, if necessary.
2009-06-29 18:07:18 -05:00
Christopher Brannon
011ec27162
Create pipe before starting the signal handler thread.
...
The thread can write to the pipe, so the pipe must be initialized
before the thread starts.
2009-06-29 17:49:49 -05:00
William Hubbs
04d10d88ec
more sound updates
...
removed the user_data processing code and put the call to snd_pcm_drop
in stop_audio.
2009-06-29 17:48:16 -05:00
William Hubbs
ceaae3640a
audio should be stopped in softsynth_thread not espeak_thread
2009-06-29 15:59:55 -05:00
William Hubbs
c9f871f687
see if we need to silence speech before we process the queue
2009-06-29 15:26:48 -05:00
William Hubbs
a82bbd8140
fixed a memory leak
...
If we processed an entry from the queue successfully, we were removing
the entry itself from the queue but not freeing the memory allocated to
the entry.
2009-06-28 17:56:21 -05:00
William Hubbs
58f09983f8
fixed callback return code
...
The callback should use the value of stop_requested as its return code.
2009-06-28 15:52:59 -05:00
William Hubbs
0238baa5c2
more alsa updates
...
Made an 'if' statement in the callback more clear and added some locking
for the audio mutex.
2009-06-28 13:52:31 -05:00
William Hubbs
bcd64cb263
created a start_audio function
...
This moves audio control to the specific files, espeak_sound.c and
alsa.c, which are tied to the sound systems.
2009-06-27 17:49:57 -05:00
William Hubbs
9b7dcebb6d
alsa updates
...
The first while loop in the callback doesn't need to be a loop. If the
audio fails, we can just print an error and return.
2009-06-27 17:10:10 -05:00
William Hubbs
46bf3d99d5
all access of the audio mutex should go through our functions
2009-06-27 16:05:27 -05:00
William Hubbs
87ab6c6ea8
make sure that snd_pcm_drop is successful.
...
This was suggested by Kirk Reiser and Chris Brannon.
2009-06-27 13:32:43 -05:00
William Hubbs
4889572ad1
use user_data to detect old events
...
When espeak_Cancel is called, change the value of user_data that is
passed to the events, and, in the callback, use this to test to see if
cancel was received. If the value of user_data has changed, discarde
events that have the old value. This patch is from Chris Brannon.
2009-06-27 13:20:43 -05:00
William Hubbs
a9398bdeb4
Added another error check for alsa
2009-06-26 23:11:15 -05:00
William Hubbs
be879d206b
alsa update
...
I changed the name of the callback to alsa_callback and removed a line
that was making the amount of data written to the sound card very small.
2009-06-26 16:12:31 -05:00
William Hubbs
c1d33d6738
Set the espeak audio buffer size to 50 ms
...
This should help make the cancel command more responsive.
2009-06-26 16:00:08 -05:00
William Hubbs
0471ff47f4
add support for the user_data parameter to espeak_synth
...
The user_data parameter is just a pointer that is passed into the
espeak_synth call that is passed back to the callback. In native mode,
we are not using it since there is not a callback. However, in alsa
mode, it will be used to indicate when a cancel was processed.
2009-06-26 11:34:28 -05:00
William Hubbs
520bbae365
renamed stopped to stop_requested
...
This is more descriptive of what the variable actually does. It signals
the callback to stop the audio.
2009-06-26 10:03:11 -05:00
William Hubbs
8f3e8f1967
moved the audio_mutex code to alsa
...
This is not needed for native sound support, so it has been moved into
the alsa specific code.
2009-06-26 09:50:11 -05:00
William Hubbs
e49acbb59a
removed a debug print
2009-06-25 22:03:57 -05:00