Commit Graph

6866 Commits

Author SHA1 Message Date
sluicebox
e8f009e04f IOS: Call exit(0) when exiting to prevent hanging
Prevents the process from hanging on exit when using the
Quit button in launcher or a game's quit function
2019-09-10 13:02:28 +03:00
Cameron Cawley
7a05624e1b
ANDROID: Rewrite to make use of OpenGLGraphicsManager (#1695)
* ANDROID: Rewrite to make use of OpenGLGraphicsManager

* ANDROID: Fix emulated mouse button up events
2019-09-08 19:37:48 +01:00
Cameron Cawley
e1878a372c
PSP: Fix missing semicolon 2019-09-06 13:59:47 +01:00
Cameron Cawley
0b4869b92b RISCOS: Fix checking the "enable_reporter" config option 2019-09-06 13:53:26 +01:00
Cameron Cawley
7a8ddcbe38 PSP: Replace PSPSaveFileManager with DefaultSaveFileManager 2019-09-06 14:48:16 +02:00
Jaromir Wysoglad
6886ae0dae SDL: Copy result of SDL_iconv_string() 2019-09-05 23:52:46 +01:00
Jaromir Wysoglad
26bf329b95 TTS: Fix possible deadlock 2019-09-05 23:52:46 +01:00
Jaromir Wysoglad
ba859f1eed TTS: Minimize the time needed for stop() on Win32
This gets rid of freezes when using TTS on Windows.
2019-09-05 23:52:46 +01:00
SupSuper
1c1cc91ad5 COMMON: Don't include win32.h in common/encoding.h 2019-09-02 08:01:18 +03:00
Jaromir Wysoglad
55c399c7c0 TTS: Use Common::Encoding for encoding conversion. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
d399c37e6e WIN32: Use uint instead of unsigned int. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4b5b812712 TTS: Better documentation of TTSVoice. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
0d332e065e TTS: Rename LinuxTextToSpeechManager to SpeechDispatcherManager
Add a new define for the SpeechDispatcherManager
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b97333d4b7 TTS: Remove USE_PLATFORM_TTS defines
Use defined(USE_TTS) && defined(PLATFORM) instead
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
d49331132a TTS: Add summary of changes in sphelper-scummvm.h 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c402666635 TTS: Refactoring
Refactoring as suggested by bluegr on github.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c861581adc TTS: Fix missing indentation 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c2c4458253 JANITORIAL: Remove some trailing whitespaces 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b1bffaba86 TTS: Implement our own queuing on windows.
Similarly as on linux, there isn't enough control of the speech
queue to properly implement INTERRUPT_NO_REPEAT. So since this
commit we use our own queuing and use SAPI to speak each speech.
This is done outside the main thread.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
be5c865c50 TTS: Add proper speech queuing, update INT_NO_REP.
Before I used SPD to queue messages and I had a copy of the queue,
so I could requeue everything when resume is called(). But more
control of the queue is needed, so I don't use the SPD's queue
and instead start speeches from my queue one by one from another
thread.

INTERRUPT_NO_REPEAT now behaves as described in the documentation
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
bc10117980 TTS: Restart SPD if resume() fails. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4036b73b6c TTS: Fix INTERRUPT_NO_REPEAT on Windows 2019-09-01 22:47:55 +03:00
Thierry Crozat
13a32fc5e9 TTS: Implement *_NO_REPEAT actions and Fix state synchronization issues on macOS
The NSSpeechSynthesizer is asynchronous and does not immediately start, pause,
or stop the speech. As a result querrying the state of the NSSpeechSynthesizer
does not alwats return the expected result (for example isSpeaking may not
yet been true just after we requested starting to speak). So instead the
TextToSpeechManager on macOS keeps track of the state itself.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
21fb4cef06 TTS: Implement our own queuing for linux
It seems like, that at least some versions of speech-dispatcher
aren't able to successfuly pause and resume. For me, when trying
to pause, it still finishes the speech just being said instead
of pausing it and then it puts it at the end of the speech queue
with some speech-dispatcher internal commands added to it, which
are also hearable.

There is no way to find out where the speech ended when calling
pause, so it is just stopped and when resume is called it is
read from it's start again.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4bae32ffe7 TTS: Add *_NO_REPEAT actions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
feaba6fff6 TTS: Reimplement isSpeaking on Windows. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
1234f8e42f TTS: Fix pause() and resume() on linux 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
7ec4f03a08 TTS: Make state switching faster on Linux 2019-09-01 22:47:55 +03:00
Thierry Crozat
9ca2602e82 TTS: Implement speech queueing on macOS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
6703f88f7f TTS: Implement speech queueing on Linux and Win 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
bbbb608c52 TTS: Implement OSD message reading 2019-09-01 22:47:55 +03:00
Thierry Crozat
bac880816b TTS: Stop or pause speaking on word boundaries in macOS implementation 2019-09-01 22:47:55 +03:00
Thierry Crozat
0434419b31 TTS: Implement TextToSpeechManager for macOS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
e965df1e88 TTS: Add TTS support when compiling with msvc. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c7dbf192ef TTS: Remove unneeded code
Remove debuging outputs
Remove commented iconv implementation of text conversion to UTF-8
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
58065ceacd TTS: Refactoring
* Delete multiple empty rows
 * Make getVolume non-virtual and leave just the implementation
    in base class
 * Resolve warning about signed / unsigned comparison in
    gui-manager
 * Clear availableVoices when updating voices on linux
 * By default set language to transMan language on windows
    (if the transMan is available)
 * Remove freeVoices method from Windows ttsMan, it isn't needed
    anymore
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
0631070833 TTS: Fix state switching on windows
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.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
e4363ba229 TTS: Minor Windows TTS refactoring
Main changes are:
 * Save age information about each voice
 * Remove Sample TTS Voice from available voices, because it
 	basicaly cannot speak.
 * Stop speech after silently playing the test speech (the last
 	voice could be heard speaking after the volume got
	restored to its original value)
 * Remove voice data freeing from freeVoices, because it gets
 	freed automaticaly
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
134d955006 TTS: Add iconv implementation of strToUtf8
This might be useful in the future, because SDL cannot convert
from some important encodings (for example CP850)
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
3027acc12e TTS: Minor refactorisations
- Add comment to tts initialization on Windows
 - Correctly free the voicesInfo in linux ttsMan
 - Remove popState method from linux-text-to-speech.h and
	windows-text-to-speech.h
 - Add tts to help in configure
 - Refactor language setting in gui-manager.cpp
	It counted with english being the default language in
	ttsMan constructors, which isn't true anymore.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b5d5576f90 TTS: Add check to getVoice, fix typo.
Check if _availableVoices isn't empty.
Replace availaible with available
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
788b15652d TTS: Change String == "" to String.empty() 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
7c78912931 TTS: Move popState to the base class 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
d31ffb676a TTS: Implement conversion to unicode in say on win 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
5c1f562452 TTS: Implement conversion to UTF-8 in say on linux 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4d95720731 TTS: Fix voice setting on startup
The ScummVM was crashing because of an assert, when there was less
voices availaible, than what was set in the ConfMan.

Now the voice just falls back to 0th voice, if there are not
enough voices.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
5d9f03e71d TTS: Add reference counting to TTSVoice
Also refactor TTSVoice destruction to use this reference counting.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
8e4a24f55e TTS: Unify setters between linux and win backends. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
ce64528129 TTS: Make sure that TTS lang matches transMan lang 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
33f8aadfeb TTS: Add age to TTSVoice 2019-09-01 22:47:55 +03:00