Open mreinstein opened 7 years ago
"full version" use audio-worker-compiler. "light version" does not use it.
audio-worker-compiler append an implicit self
.
source:
onmessage = () => {};
compiled:
self.onmessage = () => {};
In light version, you must write self.
yourself.
BTW, AudioWorker is deprecated in the recent Web Audio API specification. So, I think this module is useless no longer.
I was able to use the light version like this:
require('audio-worker-shim/light').polyfill()
// at this point you can create new audio workers as long as
// the source is compiled ahead of time with audio-worker-compiler
BTW, AudioWorker is deprecated in the recent Web Audio API specification. So, I think this module is useless no longer.
It's deprecated, intended to be placed with AudioWorklet
, that's true.
But none of the browsers have implemented this yet. Until then this seems like a reasonable module to use. :)
@mohayonao thanks for another great module!
I have some usage questions: