Table of Contents

Class ConstantSourceNode

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The ConstantSourceNode interface—part of the Web Audio API—represents an audio source (based upon AudioScheduledSourceNode) whose output is single unchanging value. This makes it useful for cases in which you need a constant value coming in from an audio source. In addition, it can be used like a constructible AudioParam by automating the value of its Offset or by connecting another node to it; see Controlling multiple parameters with ConstantSourceNode.

[Value("ConstantSourceNode")]
public class ConstantSourceNode : AudioScheduledSourceNode
Inheritance
ConstantSourceNode
Inherited Members

Remarks

A ConstantSourceNode has no inputs and exactly one monaural (one-channel) output. The output's value is always the same as the value of the Offset parameter.

-Using the Web Audio API
-AudioScheduledSourceNode
-AudioNode

See also on MDN

Constructors

ConstantSourceNode()

public ConstantSourceNode()

ConstantSourceNode(BaseAudioContext, ConstantSourceOptions)

The ConstantSourceNode() constructor creates a new
ConstantSourceNode object instance, representing an audio source which
constantly outputs samples whose values are always the same.

public ConstantSourceNode(BaseAudioContext context, ConstantSourceOptions options = null)

Parameters

context BaseAudioContext
options ConstantSourceOptions

Remarks

Properties

Offset

The read-only offset property of the ConstantSourceNode
interface returns a AudioParam object indicating the numeric a-rate value which is always returned
by the source when asked for the next sample.

[Value("offset")]
public AudioParam Offset { get; }

Property Value

AudioParam

An AudioParam object indicating the a-rate value returned for every
sample by this node. The default value is 1.0.To access the offset parameter's current value, access the parameter's
value property, as shown in the syntax box above.

Remarks

NOTE

While the AudioParam named offset is read-only, the
value property within is not. So you can change the value of
offset by setting the value of
ConstantSourceNode.offset.value:

-Using the Web Audio API
-ConstantSourceNode
-AudioNode
-AudioParam

See also on MDN