From e84e000b3ec9d393d720845a5f5fd05aa2ee7302 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 9 May 2011 21:47:56 -0500 Subject: [PATCH] add indexing support --- espeak.c | 6 ++++++ espeakup.h | 1 + softsynth.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/espeak.c b/espeak.c index 8015fc4..b192177 100644 --- a/espeak.c +++ b/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, "", 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; diff --git a/espeakup.h b/espeakup.h index 57a3f29..38187ac 100644 --- a/espeakup.h +++ b/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, diff --git a/softsynth.c b/softsynth.c index 9c5af80..a2c281b 100644 --- a/softsynth.c +++ b/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;