Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e68d5726 authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am 86ea435a: Merge change 6407 into donut

Merge commit '86ea435a'

* commit '86ea435a':
  Cleaning up logs.
parents bcd18e01 86ea435a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ class SynthProxyJniStorage {
              delete mAudioOut;
              mAudioOut = NULL;
            } else {
              LOGI("AudioTrack OK");
              //LOGI("AudioTrack OK");
              mAudioOut->start();
              LOGI("AudioTrack started");
            }
@@ -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){
        LOGV("Direct speech");
        //LOGV("Direct speech");

        if (wav == NULL) {
            delete pForAfter;
@@ -610,7 +610,7 @@ LOGI("android_tts_SynthProxy_playAudioBuffer");
    SynthProxyJniStorage* pSynthData = (SynthProxyJniStorage*)jniData;
    short* wav = (short*) bufferPointer;
    pSynthData->mAudioOut->write(wav, bufferSize);
    LOGI("AudioTrack wrote: %d bytes", bufferSize);
    //LOGI("AudioTrack wrote: %d bytes", bufferSize);
}


+5 −4
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public class TtsService extends Service implements OnCompletionListener {
        public static final int EARCON = 1;
        public static final int SILENCE = 2;
        public static final int TEXT_TO_FILE = 3;
        public String mText = null;
        public String mText = "";
        public ArrayList<String> mParams = null;
        public int mType = TEXT;
        public long mDuration = 0;
@@ -66,6 +66,7 @@ public class TtsService extends Service implements OnCompletionListener {

        public SpeechItem(long silenceTime) {
            mDuration = silenceTime;
            mType = SILENCE;
        }

        public SpeechItem(String text, ArrayList<String> params, int itemType, String filename) {
@@ -125,7 +126,7 @@ public class TtsService extends Service implements OnCompletionListener {
    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("TTS", "TTS starting");
        //Log.i("TTS", "TTS starting");

        mResolver = getContentResolver();

@@ -231,7 +232,7 @@ public class TtsService extends Service implements OnCompletionListener {


    private int isLanguageAvailable(String lang, String country, String variant) {
        Log.v("TTS", "TtsService.isLanguageAvailable(" + lang + ", " + country + ", " +variant+")");
        //Log.v("TTS", "TtsService.isLanguageAvailable(" + lang + ", " + country + ", " +variant+")");
        return nativeSynth.isLanguageAvailable(lang, country, variant);
    }

@@ -242,7 +243,7 @@ public class TtsService extends Service implements OnCompletionListener {


    private int setLanguage(String lang, String country, String variant) {
        Log.v("TTS", "TtsService.setLanguage(" + lang + ", " + country + ", " + variant + ")");
        //Log.v("TTS", "TtsService.setLanguage(" + lang + ", " + country + ", " + variant + ")");
        if (isDefaultEnforced()) {
            return nativeSynth.setLanguage(getDefaultLanguage(), getDefaultCountry(),
                    getDefaultLocVariant());