summaryrefslogtreecommitdiffstats
path: root/packages/TtsService/jni
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2009-06-24 11:32:06 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2009-06-24 11:32:06 -0700
commit6a0e293c84de02e819c1b402141bd3f7684ea164 (patch)
tree791b756560e1f3877ac47647f2b0817f0d0f26a3 /packages/TtsService/jni
parenteaa89f74c04c0f10d5f3f8190b457087537bff2e (diff)
downloadframeworks_base-6a0e293c84de02e819c1b402141bd3f7684ea164.zip
frameworks_base-6a0e293c84de02e819c1b402141bd3f7684ea164.tar.gz
frameworks_base-6a0e293c84de02e819c1b402141bd3f7684ea164.tar.bz2
Fix bug in TTS service where the language setting was using the default language
when the setting wasn't enforced, and vice-versa. Cleaning the log of the native TTS layer to use LOGV for verbose messages, rather than LOGI.
Diffstat (limited to 'packages/TtsService/jni')
-rw-r--r--packages/TtsService/jni/android_tts_SynthProxy.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp
index 0aa4fa5..0dafcc1 100644
--- a/packages/TtsService/jni/android_tts_SynthProxy.cpp
+++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+#define LOG_NDEBUG 0
#include <stdio.h>
#include <unistd.h>
@@ -168,7 +168,7 @@ void prepAudioTrack(SynthProxyJniStorage* pJniData,
static tts_callback_status ttsSynthDoneCB(void *& userdata, uint32_t rate,
AudioSystem::audio_format format, int channel,
int8_t *&wav, size_t &bufferSize, tts_synth_status status) {
- LOGI("ttsSynthDoneCallback: %d bytes", bufferSize);
+ LOGV("ttsSynthDoneCallback: %d bytes", bufferSize);
if (userdata == NULL){
LOGE("userdata == NULL");
@@ -178,7 +178,7 @@ static tts_callback_status ttsSynthDoneCB(void *& userdata, uint32_t rate,
SynthProxyJniStorage* pJniData = (SynthProxyJniStorage*)(pForAfter->jniStorage);
if (pForAfter->usageMode == USAGEMODE_PLAY_IMMEDIATELY){
- LOGI("Direct speech");
+ LOGV("Direct speech");
if (wav == NULL) {
delete pForAfter;
@@ -189,16 +189,16 @@ static tts_callback_status ttsSynthDoneCB(void *& userdata, uint32_t rate,
prepAudioTrack(pJniData, rate, format, channel);
if (pJniData->mAudioOut) {
pJniData->mAudioOut->write(wav, bufferSize);
- LOGI("AudioTrack wrote: %d bytes", bufferSize);
+ //LOGV("AudioTrack wrote: %d bytes", bufferSize);
} else {
- LOGI("Can't play, null audiotrack");
+ LOGE("Can't play, null audiotrack");
}
}
} else if (pForAfter->usageMode == USAGEMODE_WRITE_TO_FILE) {
- LOGI("Save to file");
+ LOGV("Save to file");
if (wav == NULL) {
delete pForAfter;
- LOGI("Null: speech has completed");
+ LOGV("Null: speech has completed");
}
if (bufferSize > 0){
fwrite(wav, 1, bufferSize, pForAfter->outputFile);