Closed Bug 1060879 Opened 7 years ago Closed 7 years ago
[keyboard] The first key is always inaudible
STR: 1. Enable click sound in keyboard app and make sure the volume is turned up 2. Go to an app with input 3. Tap one key Expected: 1. Hear the click sound Actual: 1. The sound is missed -- only the second sound is heard Note: 1. bug 723428 might be related, but it might not. 2. it seems that the audio hardware takes some time to warn up, hence the bug 3. The dialer app has no such issue and I try to figure out why -- the only difference between our FeedbackManager and their TonePlayer is that they are using Web Audio API and a "dummy sound". It's worthy to find out we need either or both to fix this bug. nominating feature-b2g: 2.2 since this apparently fixable in Gaia alone.
Looking into the commit log and the fist fighting in bug 917193, I found bug 980854 which will remove the opus sound and rely on Web Audio API to generate the wave frequencies. Since keyboard sound is more than simple sine waves, I can't use the approach there.
Looks like I can give WAV format a try, see bug 964584 comment 20.
Comment on attachment 8481894 [details] [review] mozilla-b2g:master PR#23534 So it turned out I don't need Web Audio stuff to get the first key audible. All I have to do is play the audio element initialized right away. Since WAV is smaller than OGG, I convert the file to WAV too. Additionally logic is written to create the next audio element so we can play them repetitively as before. Also, test pattern is fixed to make the test valid.
Attachment #8481894 - Flags: review?(rlu)
Status: NEW → ASSIGNED
Target Milestone: --- → 2.1 S3 (29aug)
Comment on attachment 8481894 [details] [review] mozilla-b2g:master PR#23534 This patch looks fine. Thank you.
Attachment #8481894 - Flags: review?(rlu) → review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.