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
AudioNodecan be target of events, therefore it implements the EventTarget interface.
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:
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
channelCountModeenumerated value, and their meanings are:NOTE
In older versions of the spec, the default for a ChannelSplitterNode wasmax.
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.
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 thisAudioNode.
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 anotherAudioNode (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
Returns
- AudioNode
If the destination is a node,
connect()returns a reference to the
destination AudioNode object, allowing you to chain multipleconnect()calls. In some browsers, older implementations of this interface
return GlobalObject.Undefined.If the destination is anAudioParam,connect()returnsundefined.
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 anotherAudioNode (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
destinationParamAudioParamoutputulong
Returns
- GlobalObject.Undefined
If the destination is a node,
connect()returns a reference to the
destination AudioNode object, allowing you to chain multipleconnect()calls. In some browsers, older implementations of this interface
return GlobalObject.Undefined.If the destination is anAudioParam,connect()returnsundefined.
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
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
destinationNodeAudioNode
Returns
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
Returns
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
Returns
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
destinationParamAudioParam
Returns
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
destinationParamAudioParamoutputulong
Returns
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
outputulong