From 7e93ec689e46539c600413ea29e22b155e2da453 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 12 Mar 2009 13:09:39 +0000 Subject: Throw away marks related workaround code since espeak-1.40.10 fixed it --- diff --git a/src/espeak.c b/src/espeak.c index d0942d1..f1a5f03 100644 --- a/src/espeak.c +++ b/src/espeak.c @@ -56,7 +56,6 @@ typedef struct int last_word; int mark_offset; const gchar *mark_name; - int last_mark; } Espin; struct _Econtext @@ -453,29 +452,10 @@ synth_cb(short *data, int numsamples, espeak_EVENT *events) // convert to 0-based position --i->text_position; - // workaround to fix text_position related faults for mark events if (i->type == espeakEVENT_MARK) { - // suppress failed text_position values - const gchar *eom = strstr(self->text + - spin->last_mark, "/>"); - if (eom) - { - int pos = eom - self->text + 2; - - if (i->text_position <= spin->last_mark || - pos > i->text_position) - i->text_position = pos; - } - else if (i->text_position <= spin->last_mark) - { - i->text_position = spin->last_mark; - } - - spin->last_mark = i->text_position; - // point mark name to text substring instead of using - // espeak's allocated string + // espeak's allocated(temporally) string int l_quote, r_quote; if ((r_quote = strbstr(self, i->text_position, "/>", 2)) != 0) if ((r_quote = strbstr(self, r_quote, "\"", 1)) != 0) @@ -509,7 +489,6 @@ synth(Econtext *self, Espin *spin) spin->mark_offset = 0; spin->mark_name = NULL; spin->last_word = -1; - spin->last_mark = 0; espeak_SetParameter(espeakPITCH, g_atomic_int_get(&self->pitch), 0); espeak_SetParameter(espeakRATE, g_atomic_int_get(&self->rate), 0); -- cgit v0.9.1