nativeformat / NFPlayerJS

A JavaScript/TypeScript audio engine for the Web and Server capable of multitrack time stretching, pitch shifting, declarative effects, faster than realtime processing, and more!
https://nativeformat.github.io/NFPlayerJS
Apache License 2.0
130 stars 9 forks source link

fix: Fix `ScriptProcessorNode` buffer size #21

Closed Korilakkuma closed 4 years ago

Korilakkuma commented 4 years ago

ScriptProcessorNode buffer size is one of 256, 512, 1024, 2048, 4096, 8912, 16384 or 0.

The ScriptProcessorNode is constructed with a bufferSize which MUST be one of the following values: 256, 512, 1024, 2048, 4096, 8192, 16384.

This value will be picked by the implementation if the bufferSize argument to createScriptProcessor() is not passed in, or is set to 0.

kirbysayshi commented 4 years ago

Huh. I wonder how I missed that! Thank you very much for the contribution, and for taking the time to investigate how it worked! I really appreciate it :D