Issue 317: Suspending AudioContext for battery usage reasons

I noticed the auto-mailer for Github was broken, but I wanted this to be
seen by the group.  I just filed a new issue (
https://github.com/WebAudio/web-audio-api/issues/317):

-----------------

We've run in to a significant request to reduce battery consumption. In
short, we need to be able to suspend the audio hardware device usage.

Unfortunately, given the current design, we have no way of doing this; the
best we can tell users is "drop all references to AudioContexts", but even
then, until garbage collection happens there's no guarantee the hardware
device context will be freed up (enabling it to suspend and stop consuming
power).

Raymond and I have discussed this in some detail, and I think our preferred
option is that we provide two methods on the AudioContext:

void suspend();
Promise resume();

...that will put the system into suspension (meaning, the AudioContext
currentTime stops progressing, all sound output is paused, and the audio
hardware can power down), and asynchronously wake it up again and resuming
processing (which *is* an asynchronous operation, and may take some amount
of [real] time until the audio system has resumed processing data).

This takes away the unpredictability of when the audio system shuts down,
but also lets us account for the latency hiccup in restarting.

Received on Monday, 5 May 2014 22:00:39 UTC