diff options
author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2018-06-16 09:18:22 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2018-06-26 08:46:58 +0000 |
commit | bdeba8eab85eff95b114617b20e520e3d63f03b8 (patch) | |
tree | aca70adeb819314e41f55821e1f91b1b7420bff7 | |
parent | c32d7c14710a78f8dcad72091ac994c75fedf4f4 (diff) |
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.
Change-Id: I6a88034b3f7336eeeaf7c5af78500b15dac19c06
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
-rw-r--r-- | src/plugins/tts/common/qtexttospeechprocessor.cpp | 2 | ||||
-rw-r--r-- | src/plugins/tts/common/qtexttospeechprocessor_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tts/common/qtexttospeechprocessor.cpp b/src/plugins/tts/common/qtexttospeechprocessor.cpp index 0a68c7d..4ec8353 100644 --- a/src/plugins/tts/common/qtexttospeechprocessor.cpp +++ b/src/plugins/tts/common/qtexttospeechprocessor.cpp @@ -46,7 +46,7 @@ QTextToSpeechProcessor::QTextToSpeechProcessor(): m_paused(false), m_rate(0), m_pitch(0), - m_volume(100), + m_volume(1.0), m_audio(0), m_audioBuffer(0) { diff --git a/src/plugins/tts/common/qtexttospeechprocessor_p.h b/src/plugins/tts/common/qtexttospeechprocessor_p.h index 5ad80d3..a0392fc 100644 --- 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; |