Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 var RowAlignment = { | 5 var RowAlignment = { |
| 6 STRETCH: "stretch", | 6 STRETCH: "stretch", |
| 7 LEFT: "left", | 7 LEFT: "left", |
| 8 RIGHT: "right", | 8 RIGHT: "right", |
| 9 CENTER: "center", | 9 CENTER: "center", |
| 10 } | 10 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 */ | 52 */ |
| 53 var DEFAULT_KEY_WEIGHT_X = 100; | 53 var DEFAULT_KEY_WEIGHT_X = 100; |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * The default weight of a key in the Y direction. | 56 * The default weight of a key in the Y direction. |
| 57 * @type {number} | 57 * @type {number} |
| 58 */ | 58 */ |
| 59 var DEFAULT_KEY_WEIGHT_Y = 70; | 59 var DEFAULT_KEY_WEIGHT_Y = 70; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * The default volume for keyboard sounds. | |
| 63 * @type {number} | |
| 64 */ | |
| 65 var DEFAULT_VOLUME = 0.2; | |
| 66 | |
| 67 /** | |
| 62 * The top padding on each key. | 68 * The top padding on each key. |
| 63 * @type {number} | 69 * @type {number} |
| 64 */ | 70 */ |
| 65 // TODO(rsadam): Remove this variable once figure out how to calculate this | 71 // TODO(rsadam): Remove this variable once figure out how to calculate this |
| 66 // number before the key is rendered. | 72 // number before the key is rendered. |
| 67 var KEY_PADDING_TOP = 1; | 73 var KEY_PADDING_TOP = 1; |
| 68 var KEY_PADDING_BOTTOM = 1; | 74 var KEY_PADDING_BOTTOM = 1; |
| 69 | 75 |
| 70 /** | 76 /** |
| 71 * The default volume for keyboard sounds. | 77 * The size of the pool to use for playing audio sounds on key press. |
|
kevers
2014/03/05 22:26:41
Probably worth commenting why the pool is required
rsadam
2014/03/06 15:49:47
Done.
| |
| 72 * @type {number} | 78 * @type {number} |
| 73 */ | 79 */ |
| 74 var DEFAULT_VOLUME = 0.3; | 80 var SOUND_POOL_SIZE = 10; |
|
rsadam
2014/03/05 19:57:47
We'd need ~20 to get it perfect. Had Steve try it
| |
| OLD | NEW |