DroidFish: Only play the announcement sound if the TTS engine is idle.

This commit is contained in:
Peter Osterlund 2016-12-27 08:26:30 +01:00
parent fbb6bace27
commit 5c6b1408f4

View File

@ -99,7 +99,8 @@ public class Speech {
public void say(String text) {
if (initialized) {
if (lang != Language.NONE && text != null) {
tts.playEarcon("[move]", TextToSpeech.QUEUE_ADD, null);
if (!tts.isSpeaking())
tts.playEarcon("[move]", TextToSpeech.QUEUE_ADD, null);
tts.speak(text, TextToSpeech.QUEUE_ADD, null);
}
toSpeak = null;