W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2014

Re: Max number og hardware contexts between tabs

From: Chinmay Pendharkar <notthetup@gmail.com>
Date: Thu, 28 Aug 2014 08:06:53 +0800
Message-ID: <CAJw8XiqFOPR_i=xudq5wJDjrV656Ndadn9fR6PEjpUFsP94awg@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: Yehonathan Sharvit <viebel@gmail.com>, "public-audio@w3.org" <public-audio@w3.org>, raphael.boukara@audyx.com
To this point, after accidentally creating multiple context way too many
times.

I have almost gotten to the point of having a window.audioContext variable
which references the only AudioContext that I initialize once, and use
everywhere, in most of my projects, libraries.

I'm yet to encounter the downside of such an approach.


On Thu, Aug 28, 2014 at 12:17 AM, Chris Wilson <cwilso@google.com> wrote:

> It's because tabs are shared in a process, sometimes.  (Particularly in
> the same domain, if I recall correctly, but I could be wrong.)
>
> We're looking in to this more, but in short - don't create extra
> AudioContexts unless there's some really, really important reason for
> needing them.  In general, use one per app.  (We're working to make that
> easier, with the suspend/resume/release proposal.)
>
>
> On Wed, Aug 27, 2014 at 9:13 AM, Yehonathan Sharvit <viebel@gmail.com>
> wrote:
>
>>  Hello,
>>
>> I don’t understand why the max number of contexts is aggregated between
>> two tabs.
>>
>> 1. On one page I am creating 4 Audio contexts.
>> 2. I am opening a tab from this page
>> 3. On the new tab I am creating 4 Audio contexts.
>>
>> Results:
>> Failed to construct 'AudioContext': number of hardware contexts reached
>> maximum
>>
>>  Here is a repro:
>>  http://jsfiddle.net/s7z74b36/8/
>>
>>  Tested on Chrome 36
>>
>>
>> Is there a way to overcome this - weird -  limitation?
>>
>>
>> Thanks.
>>
>
>
Received on Thursday, 28 August 2014 00:07:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:14 UTC