Package: qtspeech-opensource-src / 5.11.3-3

flite_volume.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: fix volume for flite
 The backend stored the volume as int, while the API uses double between
 0 and 1, make it consistent, so the getter will return sensible values.
Origin: upstream, https://code.qt.io/cgit/qt/qtspeech.git/commit/?id=bdeba8eab85eff95
Last-Update: 2019-03-25

--- a/src/plugins/tts/common/qtexttospeechprocessor.cpp
+++ b/src/plugins/tts/common/qtexttospeechprocessor.cpp
@@ -46,7 +46,7 @@ QTextToSpeechProcessor::QTextToSpeechPro
     m_paused(false),
     m_rate(0),
     m_pitch(0),
-    m_volume(100),
+    m_volume(1.0),
     m_audio(0),
     m_audioBuffer(0)
 {
--- a/src/plugins/tts/common/qtexttospeechprocessor_p.h
+++ b/src/plugins/tts/common/qtexttospeechprocessor_p.h
@@ -119,7 +119,7 @@ private:
     volatile bool m_paused;
     double m_rate;
     double m_pitch;
-    int m_volume;
+    double m_volume;
     QSemaphore m_speakSem;
     QString m_nextText;
     int m_nextVoice;