diff options
Diffstat (limited to 'pico/lib/picowa.c')
-rw-r--r-- | pico/lib/picowa.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pico/lib/picowa.c b/pico/lib/picowa.c index 3e793c9..ab8ca51 100644 --- a/pico/lib/picowa.c +++ b/pico/lib/picowa.c @@ -78,7 +78,7 @@ typedef struct wa_subobj { } wa_subobj_t; -static pico_status_t waInitialize(register picodata_ProcessingUnit this) { +static pico_status_t waInitialize(register picodata_ProcessingUnit this, picoos_int32 r_mode) { picoos_uint8 i; picoklex_Lex ulex; wa_subobj_t * wa; @@ -98,6 +98,10 @@ static pico_status_t waInitialize(register picodata_ProcessingUnit this) { wa->outBufSize = PICOWA_MAXITEMSIZE; wa->outLen = 0; + if (r_mode == PICO_RESET_SOFT) { + /*following initializations needed only at startup or after a full reset*/ + return PICO_OK; + } /* kb lex */ wa->lex = picoklex_getLex(this->voice->kbArray[PICOKNOW_KBID_LEX_MAIN]); if (wa->lex == NULL) { @@ -177,7 +181,7 @@ picodata_ProcessingUnit picowa_newWordAnaUnit(picoos_MemoryManager mm, return NULL; } - waInitialize(this); + waInitialize(this, PICO_RESET_FULL); return this; } |