OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview A composite TTS sends allows ChromeVox to use | 6 * @fileoverview A composite TTS sends allows ChromeVox to use |
7 * multiple TTS engines at the same time. | 7 * multiple TTS engines at the same time. |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 function(propertyName, increase) { | 87 function(propertyName, increase) { |
88 this.ttsEngines_.forEach(function(engine) { | 88 this.ttsEngines_.forEach(function(engine) { |
89 engine.increaseOrDecreaseProperty(propertyName, increase); | 89 engine.increaseOrDecreaseProperty(propertyName, increase); |
90 }); | 90 }); |
91 }; | 91 }; |
92 | 92 |
93 | 93 |
94 /** | 94 /** |
95 * @override | 95 * @override |
96 */ | 96 */ |
| 97 cvox.CompositeTts.prototype.propertyToPercentage = function(property) { |
| 98 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { |
| 99 var value = engine.propertyToPercentage(property); |
| 100 if (value !== undefined) |
| 101 return value; |
| 102 } |
| 103 }; |
| 104 |
| 105 |
| 106 /** |
| 107 * @override |
| 108 */ |
97 cvox.CompositeTts.prototype.getDefaultProperty = function(property) { | 109 cvox.CompositeTts.prototype.getDefaultProperty = function(property) { |
98 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { | 110 for (var i = 0, engine; engine = this.ttsEngines_[i]; i++) { |
99 var value = engine.getDefaultProperty(property); | 111 var value = engine.getDefaultProperty(property); |
100 if (value) { | 112 if (value !== undefined) |
101 return value; | 113 return value; |
102 } | |
103 } | 114 } |
104 return null; | 115 return null; |
105 }; | 116 }; |
OLD | NEW |