diff options
Diffstat (limited to 'common/text-to-speech.h')
-rw-r--r-- | common/text-to-speech.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/text-to-speech.h b/common/text-to-speech.h index 4bb81118bf..2c9b5c7778 100644 --- a/common/text-to-speech.h +++ b/common/text-to-speech.h @@ -63,7 +63,7 @@ struct TTSState { int _pitch; int _volume; String _language; - TTSVoice *_activeVoice; + int _activeVoice; Array<TTSVoice> _availaibleVoices; TTSState *_next; }; @@ -87,8 +87,8 @@ public: virtual bool isPaused() { return false; } virtual bool isReady() { return false; } - virtual void setVoice(TTSVoice *voice) {} - TTSVoice getVoice() { return *(_ttsState->_activeVoice); } + virtual void setVoice(unsigned index) {} + TTSVoice getVoice() { return _ttsState->_availaibleVoices[_ttsState->_activeVoice]; } virtual void setRate(int rate) {} int getRate() { return _ttsState->_rate; } @@ -104,6 +104,9 @@ public: Array<TTSVoice> getVoicesArray() { return _ttsState->_availaibleVoices; } + void pushState(); + bool popState(); + protected: TTSState *_ttsState; |