standardized-audio-context icon indicating copy to clipboard operation
standardized-audio-context copied to clipboard

Please implement createScriptProcessor()

Open Saintenr opened this issue 3 years ago • 2 comments

Hello Guys great work,

Im creating a project with cross device support and need the method createScriptProcessor().

Is it possible to implement this in a short term.

thanks for your feedback :)

Saintenr avatar Mar 24 '21 13:03 Saintenr

Hi @Saintenr, I'm sorry but adding the ScriptProcessorNode is not really in line with the goals of this library. It's deprecated and has been replaced by the AudioWorklet. The goal of standardized-audio-context is to allow you to program against the most recent API.

If you use an AudioWorklet with standardized-audio-context it will automatically use a ScriptProcessorNode under the hood in case the browser doesn't yet support the AudioWorklet. Right now that is only necessary when using Safari.

chrisguttandin avatar Mar 24 '21 17:03 chrisguttandin

Hey @Saintenr, just a heads up - if you are trying to get AudioWorklet working similarly to how ScriptPorcessorNode used to, it might be a bit tricky, and you'd have to utilize RingBuffer and memory sharing. Luckily there is an open-source art platform, which has a sound module that does exactly that: https://github.com/processing/p5.js-sound. A bit of digging, and you'll gain a better picture.

thecynicalpaul avatar Oct 10 '21 21:10 thecynicalpaul