- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Fri, 7 Nov 2014 13:42:10 +1300
- To: Joseph Berkovitz <joe@noteflight.com>
- Cc: Audio WG <public-audio@w3.org>
- Message-ID: <CAOp6jLYpi0Om976NTuP3jRy4uzt8NC0AKMc1Q8Re+Bq5Un2h2g@mail.gmail.com>
On Fri, Nov 7, 2014 at 6:09 AM, Joseph Berkovitz <joe@noteflight.com> wrote: > - Have createAudioWorker() return a Promise that yields a factory object > with a method that synchronously creates nodes, with each node having its > own AudioWorkerGlobalScope based on the already-loaded script. Script > *loading* would thus occur once per factory instance, but script > *execution* would occur once per node instance. (this is my proposal, > though I have little idea of what any implementation objections would be.) > > - Have createAudioWorker() return a Promise that yields a factory object > containing a live AudioWorkerGlobalScope, and allow further nodes to be > instantiated which share this same scope. Script loading and execution both > occur once per factory, because the scope is shared. However this > programming model does not isolate node instances’ state from each other. > (This is my understanding of a proposal that Jussi made, I haven’t been > able to track down the original. Jussi has said that some simple use of > closures would make the state bookkeeping easy but I don’t think an example > was provided.) > I prefer the latter, although the former works too. The ability to share resources easily in the latter approach seems worth having. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo.
Received on Friday, 7 November 2014 00:42:38 UTC