Skip to content
Browse files

add indexing support

  • Loading branch information...
1 parent 3fbbdf1 commit e84e000b3ec9d393d720845a5f5fd05aa2ee7302 @williamh committed May 9, 2011
Showing with 10 additions and 0 deletions.
  1. +6 −0 espeak.c
  2. +1 −0 espeakup.h
  3. +3 −0 softsynth.c
View
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;
View
1 espeakup.h
@@ -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
3 softsynth.c
@@ -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;

0 comments on commit e84e000

Please sign in to comment.
Something went wrong with that request. Please try again.