Currently, the text-to-speech manager will try to update the voices whenever TextToSpeechManager::pushState()/popState() is called. This causes lags of 4 - 5 seconds on Windows. Also, a warning is triggered each time. This commit prevents that from happening if the tts option is not enabled.
This commit currently affects only Windows. Other backends don't make use of the new _enabled setting. I don't know if it would make sense for any of these and I also wouldn't be able to test it.
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
They always take in U32 strings now.
- Revert tts descriptions to string, they don't use translations, so better to keep it as strings.
- Make read() take in const U32 references.
Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action
- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along
Voice is changed when changing language on windows, so when poping
state, the voice, that should get set has to be saved before
changing the language.
The speech shouldn't continue when changing state, so it is stopped
in pushState and popState.