diff options
Diffstat (limited to 'backends/text-to-speech/linux/linux-text-to-speech.cpp')
| -rw-r--r-- | backends/text-to-speech/linux/linux-text-to-speech.cpp | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp index 828eb877b3..a2a09aebdc 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -128,9 +128,12 @@ Common::String LinuxTextToSpeechManager::strToUtf8(Common::String str, Common::S  #endif  } -bool LinuxTextToSpeechManager::say(Common::String str, Common::String charset) { +bool LinuxTextToSpeechManager::say(Common::String str, Action action, Common::String charset) {  	if (_speechState == BROKEN)  		return true; + +	if (action == DROP && isSpeaking()) +		return true;  	if (charset.empty()) {  #ifdef USE_TRANSLATION @@ -142,7 +145,7 @@ bool LinuxTextToSpeechManager::say(Common::String str, Common::String charset) {  	str = strToUtf8(str, charset); -	if (isSpeaking()) +	if (isSpeaking() && action == INTERRUPT)  		stop();  	if(spd_say(_connection, SPD_MESSAGE, str.c_str()) == -1) {  		//restart the connection | 
