Class ScriptProcessorNode
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
IMPORTANT
DeprecatedScriptProcessorNode interface allows the generation, processing, or analyzing of audio using JavaScript.
[Value("ScriptProcessorNode")]
public class ScriptProcessorNode : AudioNode
- Inheritance
-
ScriptProcessorNode
- Inherited Members
Remarks
NOTE
This feature was replaced by AudioWorklets and the AudioWorkletNode interface.
The ScriptProcessorNode interface is an AudioNode audio-processing module that is linked to two buffers, one containing the input audio data, one containing the processed output audio data. An event, implementing the AudioProcessingEvent interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data.
The size of the input and output buffer are defined at the creation time, when the CreateScriptProcessor(ulong, ulong, ulong) method is called (both are defined by CreateScriptProcessor(ulong, ulong, ulong)'s bufferSize parameter). The buffer size must be a power of 2 between 256 and 16384, that is 256, 512, 1024, 2048, 4096, 8192 or 16384. Small numbers lower the latency, but large number may be necessary to avoid audio breakup and glitches.
If the buffer size is not defined, which is recommended, the browser will pick one that its heuristic deems appropriate.
Constructors
ScriptProcessorNode()
public ScriptProcessorNode()
Properties
BufferSize
IMPORTANT
DeprecatedbufferSize property of the ScriptProcessorNode interface returns an integer representing both the input and output buffer size, in sample-frames. Its value can be a power of 2 value in the range 256 – 16384.
[Value("bufferSize")]
public long BufferSize { get; }
Property Value
- long
An integer.
Remarks
NOTE
This feature was replaced by AudioWorklets and the AudioWorkletNode interface.
Onaudioprocess
[Value("onaudioprocess")]
public EventHandlerNonNull Onaudioprocess { get; set; }