diff options
author | Charles Chen <clchen@google.com> | 2009-07-18 00:23:34 -0700 |
---|---|---|
committer | Charles Chen <clchen@google.com> | 2009-07-18 00:25:21 -0700 |
commit | 342c329203ef1cb856bd4e0a6591b2d8080c0a64 (patch) | |
tree | 7f793591270682108c4645902d0f5e0df30eeb73 /packages/TtsService/jni | |
parent | 4b897aa99bf71f933f5b202c1531858382122d6f (diff) | |
download | frameworks_base-342c329203ef1cb856bd4e0a6591b2d8080c0a64.zip frameworks_base-342c329203ef1cb856bd4e0a6591b2d8080c0a64.tar.gz frameworks_base-342c329203ef1cb856bd4e0a6591b2d8080c0a64.tar.bz2 |
Fixing the random audio mangling problem (TTS becomes incomprehensibly fast)
Diffstat (limited to 'packages/TtsService/jni')
-rw-r--r-- | packages/TtsService/jni/android_tts_SynthProxy.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp index 80eb3cb..68e3fb7 100644 --- a/packages/TtsService/jni/android_tts_SynthProxy.cpp +++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp @@ -194,6 +194,7 @@ static tts_callback_status ttsSynthDoneCB(void *& userdata, uint32_t rate, if (bufferSize > 0) { prepAudioTrack(pJniData, pForAfter->streamType, rate, format, channel); if (pJniData->mAudioOut) { + pJniData->mAudioOut->start(); pJniData->mAudioOut->write(wav, bufferSize); memset(wav, 0, bufferSize); //LOGV("AudioTrack wrote: %d bytes", bufferSize); @@ -549,7 +550,6 @@ android_tts_SynthProxy_speak(JNIEnv *env, jobject thiz, jint jniData, if (pSynthData->mAudioOut) { pSynthData->mAudioOut->stop(); - pSynthData->mAudioOut->start(); } afterSynthData_t* pForAfter = new (afterSynthData_t); |