[Webkit-unassigned] [Bug 224279] OfflineAudioContext startRendering fail after N calls

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 7 13:13:45 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=224279

--- Comment #11 from Jason <jasonlmcaffee at gmail.com> ---
Ok, that makes sense.  I've updated the codepen to use a setTimeout of 1ms between calls:
https://codepen.io/jasonmcaffee/pen/wvgrqLb

```
const AudioContext = window.AudioContext || window.webkitAudioContext;
const OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;

async function main(){
  const sampleRate = 44100;
  const length = 4000 * sampleRate;
  for(let i = 0; i < 60; ++i){
    print(`rendering ${i}`);
    try{
      new OfflineAudioContext(2, length, sampleRate);
      await sleep(1);
    }catch(e){
      print(`error rendering offline: `, e.message);
    }
  }
  print(`done`);
}

async function sleep(ms: number){
  return new Promise((resolve, reject)=>{
    setTimeout(resolve, ms);
  });
}

```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210407/782bd839/attachment.htm>


More information about the webkit-unassigned mailing list