aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-10 10:49:29 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commitf78fc85f3a0c92245802098327425d21670d9479 (patch)
tree4ae190e34e8b90c6dd8ce5a5a0ecedcba62c691e /common
parentb1b03b18d35d59ad0d712c723a3d4f8c02dcfc18 (diff)
downloadscummvm-rg350-f78fc85f3a0c92245802098327425d21670d9479.tar.gz
scummvm-rg350-f78fc85f3a0c92245802098327425d21670d9479.tar.bz2
scummvm-rg350-f78fc85f3a0c92245802098327425d21670d9479.zip
TTS: Create a TTS skeleton
Diffstat (limited to 'common')
-rw-r--r--common/system.cpp9
-rw-r--r--common/system.h23
-rw-r--r--common/text-to-speech.h45
3 files changed, 77 insertions, 0 deletions
diff --git a/common/system.cpp b/common/system.cpp
index 9f6dc60d22..8d1ab84a3d 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -31,6 +31,7 @@
#include "common/updates.h"
#include "common/dialogs.h"
#include "common/textconsole.h"
+#include "common/text-to-speech.h"
#include "backends/audiocd/default/default-audiocd.h"
#include "backends/fs/fs-factory.h"
@@ -49,6 +50,9 @@ OSystem::OSystem() {
#if defined(USE_UPDATES)
_updateManager = nullptr;
#endif
+#if defined(USE_TTS)
+ _textToSpeechManager = nullptr;
+#endif
#if defined(USE_SYSDIALOGS)
_dialogManager = nullptr;
#endif
@@ -76,6 +80,11 @@ OSystem::~OSystem() {
_updateManager = nullptr;
#endif
+#if defined(USE_TTS)
+ delete _textToSpeechManager;
+ _textToSpeechManager = 0;
+#endif
+
#if defined(USE_SYSDIALOGS)
delete _dialogManager;
_dialogManager = nullptr;
diff --git a/common/system.h b/common/system.h
index 77bdcd0815..f17625e215 100644
--- a/common/system.h
+++ b/common/system.h
@@ -49,6 +49,9 @@ class TaskbarManager;
#if defined(USE_UPDATES)
class UpdateManager;
#endif
+#if defined(USE_TTS)
+class TextToSpeechManager;
+#endif
#if defined(USE_SYSDIALOGS)
class DialogManager;
#endif
@@ -184,6 +187,15 @@ protected:
Common::UpdateManager *_updateManager;
#endif
+#if defined(USE_TTS)
+ /**
+ * No default value is provided for _textToSpeechManager by OSystem.
+ *
+ * @note _textToSpeechManager is deleted by the OSystem destructor.
+ */
+ Common::TextToSpeechManager *_textToSpeechManager;
+#endif
+
#if defined(USE_SYSDIALOGS)
/**
* No default value is provided for _dialogManager by OSystem.
@@ -1325,6 +1337,17 @@ public:
}
#endif
+#if defined(USE_TTS)
+ /**
+ * Returns the TextToSpeechManager, used to handle text to speech features.
+ *
+ * @return the TextToSpeechManager for the current architecture
+ */
+ virtual Common::TextToSpeechManager *getTextToSpeechManager() {
+ return _textToSpeechManager;
+ }
+#endif
+
#if defined(USE_SYSDIALOGS)
/**
* Returns the DialogManager, used to handle system dialogs.
diff --git a/common/text-to-speech.h b/common/text-to-speech.h
new file mode 100644
index 0000000000..e95050e3f5
--- /dev/null
+++ b/common/text-to-speech.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H
+#define BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H
+
+#if defined(USE_TTS)
+
+namespace Common {
+
+/**
+ * The TextToSpeechManager allows speech synthesis.
+ *
+ */
+class TextToSpeechManager {
+public:
+ TextToSpeechManager() {}
+ virtual ~TextToSpeechManager() {}
+
+};
+
+} // End of namespace Common
+
+#endif
+
+#endif // BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H