From ddc63ad04b58b8a883b4984a7af2aea2fdbff337 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Fri, 8 Jan 2010 14:06:21 -0800 Subject: 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. --- packages/TtsService/jni/android_tts_SynthProxy.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/TtsService/jni') 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"); } } }; -- cgit v1.1