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

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, 10 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
Index: ui/keyboard/resources/constants.js
diff --git a/ui/keyboard/resources/constants.js b/ui/keyboard/resources/constants.js
index d944d8e8490dcfd7b49ce49f75ae8e982fc60372..74766776568c7d1ca2edb199afe27e3198fa63dd 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,7 @@ 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.
kevers 2014/03/05 22:26:41 Probably worth commenting why the pool is required
rsadam 2014/03/06 15:49:47 Done.
* @type {number}
*/
-var DEFAULT_VOLUME = 0.3;
+var SOUND_POOL_SIZE = 10;
rsadam 2014/03/05 19:57:47 We'd need ~20 to get it perfect. Had Steve try it
« no previous file with comments | « no previous file | ui/keyboard/resources/elements/kb-key-base.html » ('j') | ui/keyboard/resources/elements/kb-key-base.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698