OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 This is the low-level class that generates ChromeVox's | 6 * @fileoverview This is the low-level class that generates ChromeVox's |
7 * earcons. It's designed to be self-contained and not depend on the | 7 * earcons. It's designed to be self-contained and not depend on the |
8 * rest of the code. | 8 * rest of the code. |
9 */ | 9 */ |
10 | 10 |
11 goog.provide('EarconEngine'); | 11 goog.provide('EarconEngine'); |
12 | 12 |
13 /** | 13 /** |
14 * EarconEngine generates ChromeVox's earcons using the web audio API. | 14 * EarconEngine generates ChromeVox's earcons using the web audio API. |
15 * @constructor | 15 * @constructor |
16 */ | 16 */ |
17 EarconEngine = function() { | 17 EarconEngine = function() { |
18 // Public control parameters. All of these are meant to be adjustable. | 18 // Public control parameters. All of these are meant to be adjustable. |
19 | 19 |
20 /** @type {number} The master volume, as an amplification factor. */ | 20 /** @type {number} The master volume, as an amplification factor. */ |
21 this.masterVolume = 0.2; | 21 this.masterVolume = 1.0; |
22 | 22 |
23 /** @type {number} The base relative pitch adjustment, in half-steps. */ | 23 /** @type {number} The base relative pitch adjustment, in half-steps. */ |
24 this.masterPitch = -4; | 24 this.masterPitch = -4; |
25 | 25 |
26 /** @type {number} The click volume, as an amplification factor. */ | 26 /** @type {number} The click volume, as an amplification factor. */ |
27 this.clickVolume = 0.4; | 27 this.clickVolume = 0.4; |
28 | 28 |
29 /** @type {number} The volume of the static sound, as an ampl factor. */ | 29 /** @type {number} The volume of the static sound, as an ampl factor. */ |
30 this.staticVolume = 0.2; | 30 this.staticVolume = 0.2; |
31 | 31 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 } | 683 } |
684 | 684 |
685 for (var i = 0; i < this.progressSources_.length; i++) { | 685 for (var i = 0; i < this.progressSources_.length; i++) { |
686 this.progressSources_[i][1].stop(); | 686 this.progressSources_[i][1].stop(); |
687 } | 687 } |
688 this.progressSources_ = []; | 688 this.progressSources_ = []; |
689 | 689 |
690 window.clearInterval(this.progressIntervalID_); | 690 window.clearInterval(this.progressIntervalID_); |
691 this.progressIntervalID_ = null; | 691 this.progressIntervalID_ = null; |
692 }; | 692 }; |
OLD | NEW |