summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2009-07-16 21:33:59 -0700
committerCharles Chen <clchen@google.com>2009-07-16 21:33:59 -0700
commitde0498d852dc3f1517989ffa06593aa67f8b5d80 (patch)
treebebcde3a46d487d31b5654774388ba7026a2a6b8
parent0253f57b5d2454e31906bcfdfa9168587ecbef42 (diff)
downloadexternal_svox-de0498d852dc3f1517989ffa06593aa67f8b5d80.zip
external_svox-de0498d852dc3f1517989ffa06593aa67f8b5d80.tar.gz
external_svox-de0498d852dc3f1517989ffa06593aa67f8b5d80.tar.bz2
Reducing the chances of mangled audio output by
making sure to clean up after each synth abort.
-rw-r--r--pico/tts/com_svox_picottsengine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/pico/tts/com_svox_picottsengine.cpp b/pico/tts/com_svox_picottsengine.cpp
index aa1b7e3..5e530b2 100644
--- a/pico/tts/com_svox_picottsengine.cpp
+++ b/pico/tts/com_svox_picottsengine.cpp
@@ -1333,13 +1333,16 @@ tts_result TtsEngine::synthesizeText( const char * text, int8_t * buffer, size_t
picoSynthAbort = 0;
if (ret != PICO_STEP_IDLE) {
- LOGE("Error occurred during synthesis [%d]", ret);
+ if (ret != 0){
+ LOGE("Error occurred during synthesis [%d]", ret);
+ }
if (local_text) {
free(local_text);
}
LOGV("Synth loop: sending TTS_SYNTH_DONE after error");
picoSynthDoneCBPtr( userdata, 16000, AudioSystem::PCM_16_BIT, 1, buffer, bufused,
TTS_SYNTH_DONE);
+ pico_resetEngine( picoEngine );
return TTS_FAILURE;
}
}