mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Fix SAPI default speed being way too fast.
The settings currently can't differentiate between default values for different subitems (i.e. different TTS systems). As a result the default value returned for SAPI speed was way out of bounds, leading to the upper limit getting used. Work around this limitation by checking the value for bounds and use a sensible value in that case. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29763 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c6a8efb8af
commit
3467ee8ddd
1 changed files with 5 additions and 2 deletions
|
|
@ -52,8 +52,11 @@ void TTSSapi::generateSettings()
|
|||
connect(setting,SIGNAL(refresh()),this,SLOT(updateVoiceList()));
|
||||
insertSetting(eVOICE,setting);
|
||||
//speed
|
||||
insertSetting(eSPEED,new EncTtsSetting(this,EncTtsSetting::eINT,
|
||||
tr("Speed:"),RbSettings::subValue("sapi",RbSettings::TtsSpeed),-10,10));
|
||||
int speed = RbSettings::subValue("sapi", RbSettings::TtsSpeed).toInt();
|
||||
if(speed > 10 || speed < -10)
|
||||
speed = 0;
|
||||
insertSetting(eSPEED, new EncTtsSetting(this, EncTtsSetting::eINT,
|
||||
tr("Speed:"), speed, -10, 10));
|
||||
// options
|
||||
insertSetting(eOPTIONS,new EncTtsSetting(this,EncTtsSetting::eSTRING,
|
||||
tr("Options:"),RbSettings::subValue("sapi",RbSettings::TtsOptions)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue