electronoora / webaudio-mod-player

MOD/S3M/XM module player for Web Audio
https://mod.haxor.fi/
MIT License
364 stars 54 forks source link

Refactor to use AudioWorkletNode instead of ScriptProcessorNode #28

Open electronoora opened 3 years ago

electronoora commented 3 years ago

ScriptProcessorNode has been deprecated and replaced by AudioWorkletNode, which by now is supported by all the major browsers. Refactor the player code to use an AudioWorkletNode.

Since this also results in the mixing to happen in an AudioWorkletProcessor running in the Web Audio rendering thread, this should yield more stable audio performance.