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

Commit f5c87b38 authored by Charles Chen's avatar Charles Chen
Browse files

Fixing a bug with the TextToSpeech speech queue processing.

The queue processor should not be called for the next item
until synthesis has actually happened for the current item;
before it was being incorrectly called regardless of
whether or not the synthesizer had processed the current item.
parent 67909184
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -802,11 +802,11 @@ public class TtsService extends Service implements OnCompletionListener {
                    }
                    if (synthAvailable) {
                        synthesizerLock.unlock();
                    }
                        processSpeechQueue();
                    }
                }
            }
        }
        Thread synth = (new Thread(new SynthThread()));
        synth.setPriority(Thread.MAX_PRIORITY);
        synth.start();
@@ -882,11 +882,11 @@ public class TtsService extends Service implements OnCompletionListener {
                    }
                    if (synthAvailable) {
                        synthesizerLock.unlock();
                    }
                        processSpeechQueue();
                    }
                }
            }
        }
        Thread synth = (new Thread(new SynthThread()));
        synth.setPriority(Thread.MAX_PRIORITY);
        synth.start();