Closed Bug 1053193 Opened 10 years ago Closed 10 years ago

Improve performance of system accessibility sounds where possible.

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: yzen, Assigned: yzen)

References

Details

(Keywords: access)

Attachments

(1 file)

We need to make sure that the sounds have no quiet intervals in the beginning. In some cases we can shave >10ms off.
Also need to explore web audio for playing the sounds.
Summary: Crop system accessibility sounds where possible. → Improve performance of system accessibility sounds where possible.
(NI myself so I remember about this bug).
Flags: needinfo?(paul)
When 848954 lands, you will be able to use Web Audio API for this, using decodeAudioData, and AudioBufferSourceNode.

In the meantime, you can do the following:

>  var snds = {"sound0.ogg": null, "sound1.ogg":null, ...};
>  // preload the sounds
>  for (var url in snds) {
>    snds[url] = new Audio(url);
>    snds[url].load();
>  }
>  // clone the node and play it. this is fast-pathed
>  function play(url) {
>    snds[url].cloneNode(false).play();
>  }
Flags: needinfo?(paul)
Attached file Github pull request.
Making sure that the sound affect happens at the same time as the vibration.
Attachment #8475382 - Flags: review?(alive)
Comment on attachment 8475382 [details] [review]
Github pull request.

Never know this trick :/
Attachment #8475382 - Flags: review?(alive) → review+
https://github.com/mozilla-b2g/gaia/commit/06e4db555dcb6fd6439b67963286d930a7be6233
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: