Skip to content

Instantly share code, notes, and snippets.

@andrewmunro
Created September 21, 2017 18:15
Show Gist options
  • Save andrewmunro/9ce7370583b1891f9e3768a7203703dc to your computer and use it in GitHub Desktop.
Save andrewmunro/9ce7370583b1891f9e3768a7203703dc to your computer and use it in GitHub Desktop.
Monkeypatch decodeAudioData to prevent errors when codec is not installed
AudioContext.prototype.decodeAudioData = (_, cb) => { if(cb) cb(new AudioContext().createBuffer(1, 19999999, 44100))};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment