Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: ui/keyboard/resources/constants.js

Issue 183893033: Use a sound pool instead of a single audio tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@consistant-css
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/constants.js
diff --git a/ui/keyboard/resources/constants.js b/ui/keyboard/resources/constants.js
index d944d8e8490dcfd7b49ce49f75ae8e982fc60372..7af40a280ffb0c1e4345312599b51fb114c2866b 100644
--- a/ui/keyboard/resources/constants.js
+++ b/ui/keyboard/resources/constants.js
@@ -59,6 +59,12 @@ var DEFAULT_KEY_WEIGHT_X = 100;
var DEFAULT_KEY_WEIGHT_Y = 70;
/**
+ * The default volume for keyboard sounds.
+ * @type {number}
+ */
+var DEFAULT_VOLUME = 0.2;
+
+/**
* The top padding on each key.
* @type {number}
*/
@@ -68,7 +74,9 @@ var KEY_PADDING_TOP = 1;
var KEY_PADDING_BOTTOM = 1;
/**
- * The default volume for keyboard sounds.
+ * The size of the pool to use for playing audio sounds on key press. This is to
+ * enable the same sound to be overlayed, for example, when a repeat key is
+ * pressed.
* @type {number}
*/
-var DEFAULT_VOLUME = 0.3;
+var SOUND_POOL_SIZE = 10;
« no previous file with comments | « no previous file | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698