diff options
author | Jaromir Wysoglad | 2019-07-31 15:10:12 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | 6703f88f7f91bc22ce5ea3593a1699f1dc4fa7c0 (patch) | |
tree | b277c6509b1bd632669b5de0fd1d0f66a567b880 /common | |
parent | bbbb608c528699f281fdd5a8a7d814dd44b9aa41 (diff) | |
download | scummvm-rg350-6703f88f7f91bc22ce5ea3593a1699f1dc4fa7c0.tar.gz scummvm-rg350-6703f88f7f91bc22ce5ea3593a1699f1dc4fa7c0.tar.bz2 scummvm-rg350-6703f88f7f91bc22ce5ea3593a1699f1dc4fa7c0.zip |
TTS: Implement speech queueing on Linux and Win
Diffstat (limited to 'common')
-rw-r--r-- | common/text-to-speech.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/common/text-to-speech.h b/common/text-to-speech.h index 004de3116b..b776a1cae3 100644 --- a/common/text-to-speech.h +++ b/common/text-to-speech.h @@ -136,6 +136,11 @@ struct TTSState { */ class TextToSpeechManager { public: + enum Action { + INTERRUPT, + QUEUE, + DROP + }; /** * The constructor sets the language to the translation manager language if * USE_TRANSLATION is defined, or english when it isn't defined. It sets the rate, @@ -145,13 +150,23 @@ public: virtual ~TextToSpeechManager(); /** + * Interrupts what's being said and says the given string + * + * @param str The string to say + * @param charset The encoding of the string. If empty this is assumed to be the + * encoding used for the GUI. + */ + virtual bool say(String str, String charset = "") { return say(str, INTERRUPT, charset); } + + /** * Says the given string * * @param str The string to say + * @param action What to do if another string is just being said. * @param charset The encoding of the string. If empty this is assumed to be the * encoding used for the GUI. */ - virtual bool say(String str, String charset = "") { return false; } + virtual bool say(String str, Action action, String charset = "") { return false; } /** * Stops the speech |