add indexing support

This commit is contained in:
William Hubbs 2011-05-09 21:47:56 -05:00
commit e84e000b3e
3 changed files with 10 additions and 0 deletions

View file

@ -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;

View file

@ -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,

View file

@ -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;