W3C home > Mailing lists > Public > www-tag@w3.org > September 2014

Re: AudioContext suspend/resume/release

From: Alex Russell <slightlyoff@google.com>
Date: Tue, 9 Sep 2014 14:22:34 -0700
Message-ID: <CANr5HFUDZd7w9HOOWWcv-L4RZ6O_41dtJCLQqm0P8m+pMwdOAQ@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: "www-tag@w3.org List" <www-tag@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:57:05 UTC