mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-20 23:04:18 +02:00
add indexing support
This commit is contained in:
parent
3fbbdf1922
commit
e84e000b3e
3 changed files with 10 additions and 0 deletions
6
espeak.c
6
espeak.c
|
|
@ -185,6 +185,7 @@ static void synth_queue_clear()
|
|||
static void queue_process_entry(struct synth_t *s)
|
||||
{
|
||||
espeak_ERROR error;
|
||||
char markbuff[50];
|
||||
static struct espeak_entry_t *current = NULL;
|
||||
|
||||
if (current != queue_peek(synth_queue)) {
|
||||
|
|
@ -197,6 +198,11 @@ static void queue_process_entry(struct synth_t *s)
|
|||
case CMD_SET_FREQUENCY:
|
||||
error = set_frequency(s, current->value, current->adjust);
|
||||
break;
|
||||
case CMD_SET_MARK:
|
||||
sprintf(markbuff, "<mark name=\"%d\"/>", current->value);
|
||||
error = espeak_Synth(markbuff, strlen(markbuff)+1, 0, POS_CHARACTER,
|
||||
0, espeakSSML, NULL, NULL);
|
||||
break;
|
||||
case CMD_SET_PITCH:
|
||||
error = set_pitch(s, current->value, current->adjust);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ enum espeakup_mode_t {
|
|||
|
||||
enum command_t {
|
||||
CMD_SET_FREQUENCY,
|
||||
CMD_SET_MARK,
|
||||
CMD_SET_PITCH,
|
||||
CMD_SET_PUNCTUATION,
|
||||
CMD_SET_RATE,
|
||||
|
|
|
|||
|
|
@ -123,6 +123,9 @@ static int process_command(struct synth_t *s, char *buf, int start)
|
|||
case 'f':
|
||||
cmd = CMD_SET_FREQUENCY;
|
||||
break;
|
||||
case 'i':
|
||||
cmd = CMD_SET_MARK;
|
||||
break;
|
||||
case 'p':
|
||||
cmd = CMD_SET_PITCH;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue