Re: AudioContext suspend/resume/release

The pattern you're describing seems fine to me. What's the relationship
between this `release()` the document's default output context. Is it
possible to likewise "mute a page" by releasing that too?


On Fri, Aug 29, 2014 at 12:28 PM, Chris Wilson <cwilso@google.com> wrote:

> Hello TAG!
>
> We're discussing an issue in the Web Audio API (
> https://github.com/WebAudio/web-audio-api/issues/317) of the need for
> suspending and resuming AudioContexts for power consumption reasons.
>  Alongside this, we've found the need to be able to release AudioContexts
> completely - in short, AudioContexts may be consuming system resources, and
> we need a way for developers to definitively state "I'm done with this
> now", aside from just releasing references and hoping the GC takes care of
> it.
>
> The current proposal
> <http://cwilso.github.io/web-audio-api/proposals.html#widl-AudioContext-release-Promise>
> is to add a method to the AudioContext interface:
>
> Promise release ();
>
> Releases the audio context, including any system resources used by it.
> This will not automatically release all AudioContext-created objects,
> unless other references have been released as well; however, it will
> forcibly release any system resources that might prevent additional
> AudioContexts from being created and used. The promise resolves when any
> AudioContext-creation-blocking resources have been released.
>
> Do you have any concerns over this pattern?
>
> Thanks,
> -Chris
>
>

Received on Tuesday, 9 September 2014 21:23:35 UTC