[MM] Proper use of tts_get_speed_range()
authorws29.jung <ws29.jung@samsung.com>
Wed, 22 Jul 2015 11:12:33 +0000 (20:12 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commit888bf4342b3188da58dadc256756f32d37ecdcbc
tree0dab14e16c84206c590caab778763bcca2c9d9c5
parent8438b96dc4fb7c5557ba1922151676b2049e3ed5
[MM] Proper use of tts_get_speed_range()

We should pass non-null parameters to |tts_get_speed_range|.
Otherwise, invalid parameter error would be raised by TTS engine.

In addition to fixing above, patch does followings as well.
- Update the logic of converting from float rate to int speed used by
  TTS engine. According to platform team, the rate-to-speed mapping varies
  depending on specific TTS engine on use, but current setting is roughly
  as follows:
    'tts_speed' | rate
    -----------------
    Min.        | 0.6
    Normal      | 1.0
    Max.        | 2.0
  Linear interpolation method is adopted to get |tts_speed| from
  an arbitrary |rate|.
- Make the private method that did the conversion as a local free function.
- Drop legacy 2.3 code path, which seems no longer valid.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=13980
Reviewed by: SeungSeop Park, Sharath Kamath

Change-Id: Ic3964561b5fc8bf62d6d3e1f67c55669db978039
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
tizen_src/chromium_impl/content/browser/speech/tts_tizen.cc
tizen_src/chromium_impl/content/browser/speech/tts_tizen.h