Table of Contents

Class AudioNode

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The AudioNode interface is a generic interface for representing an audio processing module.

[Value("AudioNode")]
public class AudioNode : EventTarget
Inheritance
AudioNode
Derived
Inherited Members

Remarks

Examples include:

NOTE

An AudioNode can be target of events, therefore it implements the EventTarget interface.

-Using the Web Audio API

See also on MDN

Constructors

AudioNode()

public AudioNode()

Properties

ChannelCount

The channelCount property of the AudioNode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.

[Value("channelCount")]
public ulong ChannelCount { get; set; }

Property Value

ulong

An integer.

Remarks

channelCount's usage and precise definition depend on the value of ChannelCountMode:

-Using the Web Audio API

See also on MDN

ChannelCountMode

The channelCountMode property of the AudioNode interface represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.

[Value("channelCountMode")]
public ChannelCountMode ChannelCountMode { get; set; }

Property Value

ChannelCountMode

The possible values of the channelCountMode enumerated value, and their meanings are:

NOTE
In older versions of the spec, the default for a ChannelSplitterNode was max.

Remarks

ChannelInterpretation

The channelInterpretation property of the AudioNode interface represents an enumerated value describing how input channels are mapped to output channels when the number of inputs/outputs is different. For example, this setting defines how a mono input will be up-mixed to a stereo or 5.1 channel output, or how a quad channel input will be down-mixed to a stereo or mono output.

[Value("channelInterpretation")]
public ChannelInterpretation ChannelInterpretation { get; set; }

Property Value

ChannelInterpretation

The values are documented in Basic concepts behind Web Audio API > up-mixing and down-mixing.In summary:

Remarks

The property has two options: speakers and discrete. These are documented in Basic concepts behind Web Audio API > up-mixing and down-mixing.

-Using the Web Audio API

See also on MDN

Context

The read-only context property of the
AudioNode interface returns the associated
BaseAudioContext, that is the object representing the processing graph
the node is participating in.

[Value("context")]
public BaseAudioContext Context { get; }

Property Value

BaseAudioContext

The AudioContext or OfflineAudioContext object that was
used to construct this AudioNode.

Remarks

NumberOfInputs

The numberOfInputs property of
the AudioNode interface returns the number of inputs feeding the
node. Source nodes are defined as nodes having a numberOfInputs
property with a value of 0.

[Value("numberOfInputs")]
public ulong NumberOfInputs { get; }

Property Value

ulong

An integer ≥ 0.

Remarks

NumberOfOutputs

The numberOfOutputs property of
the AudioNode interface returns the number of outputs coming out of
the node. Destination nodes — like AudioDestinationNode — have
a value of 0 for this attribute.

[Value("numberOfOutputs")]
public ulong NumberOfOutputs { get; }

Property Value

ulong

An integer ≥ 0.

Remarks

Methods

Connect(AudioNode, ulong, ulong)

The connect() method of the AudioNode interface lets
you connect one of the node's outputs to a target, which may be either another
AudioNode (thereby directing the sound data to the specified node) or an
AudioParam, so that the node's output data is automatically used to
change the value of that parameter over time.

[Value("connect")]
public AudioNode Connect(AudioNode destinationNode, ulong output = 0, ulong input = 0)

Parameters

destinationNode AudioNode
output ulong
input ulong

Returns

AudioNode

If the destination is a node, connect() returns a reference to the
destination AudioNode object, allowing you to chain multiple
connect() calls. In some browsers, older implementations of this interface
return GlobalObject.Undefined.If the destination is an AudioParam, connect() returns
undefined.

Remarks

Connect(AudioParam, ulong)

The connect() method of the AudioNode interface lets
you connect one of the node's outputs to a target, which may be either another
AudioNode (thereby directing the sound data to the specified node) or an
AudioParam, so that the node's output data is automatically used to
change the value of that parameter over time.

[Value("connect")]
public GlobalObject.Undefined Connect(AudioParam destinationParam, ulong output = 0)

Parameters

destinationParam AudioParam
output ulong

Returns

GlobalObject.Undefined

If the destination is a node, connect() returns a reference to the
destination AudioNode object, allowing you to chain multiple
connect() calls. In some browsers, older implementations of this interface
return GlobalObject.Undefined.If the destination is an AudioParam, connect() returns
undefined.

Remarks

Disconnect()

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(AudioNode)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(AudioNode destinationNode)

Parameters

destinationNode AudioNode

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(AudioNode, ulong)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(AudioNode destinationNode, ulong output)

Parameters

destinationNode AudioNode
output ulong

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(AudioNode, ulong, ulong)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(AudioNode destinationNode, ulong output, ulong input)

Parameters

destinationNode AudioNode
output ulong
input ulong

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(AudioParam)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(AudioParam destinationParam)

Parameters

destinationParam AudioParam

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(AudioParam, ulong)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(AudioParam destinationParam, ulong output)

Parameters

destinationParam AudioParam
output ulong

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Disconnect(ulong)

The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

[Value("disconnect")]
public GlobalObject.Undefined Disconnect(ulong output)

Parameters

output ulong

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks