diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2010-01-08 14:06:21 -0800 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2010-01-08 15:03:50 -0800 |
commit | ddc63ad04b58b8a883b4984a7af2aea2fdbff337 (patch) | |
tree | ef99f976e9658fc4510ad29007db317b40c7326b /packages | |
parent | 923432d5ca397b3c83de4049434f060f307c7c3a (diff) | |
download | frameworks_base-ddc63ad04b58b8a883b4984a7af2aea2fdbff337.zip frameworks_base-ddc63ad04b58b8a883b4984a7af2aea2fdbff337.tar.gz frameworks_base-ddc63ad04b58b8a883b4984a7af2aea2fdbff337.tar.bz2 |
Remove useless start of AudioTrack for TTS and improper volume setting.
The AudioTrack that plays the synthesized audio data should only be
started when the first synthesis request is sent, not after the
initialization of the engine.
The track volume should be initialized to it nominal level. Volumes
above 1 do not provide amplification, so setting the volume to 2 is
not necessary.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/TtsService/jni/android_tts_SynthProxy.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp index 17ece04..d114ea9 100644 --- a/packages/TtsService/jni/android_tts_SynthProxy.cpp +++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp @@ -230,9 +230,8 @@ class SynthProxyJniStorage { mAudioOut = NULL; } else { //LOGI("AudioTrack OK"); - mAudioOut->setVolume(2.0f, 2.0f); - mAudioOut->start(); - LOGV("AudioTrack started"); + mAudioOut->setVolume(1.0f, 1.0f); + LOGV("AudioTrack ready"); } } }; |