Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public abstract class AudioNode
- Object
- AudioNode
Known subtypesAnalyserNode, AudioDestinationNode, AudioProcessorNode, AudioScheduledSourceNode, BiquadFilterNode, ChannelMergerNode, ChannelSplitterNode, ConvolverNode, DelayNode, DynamicsCompressorNode, GainNode, IIRFilterNode, MicrophoneSourceNode, PannerNode, StereoPannerNode, WaveShaperNode
A processing block of an audio graph, the Web Audio AudioNode.
Nodes are created by a context (context.createGain() and so on) and wired
with connect(AudioNode); audio is heard once a path reaches
BaseAudioContext.getDestination(). Each input mixes everything connected
to it to a channel count decided by getChannelCountMode(),
getChannelCount() and getChannelInterpretation(), following the
specification’s mixing rules.
A cycle in the graph must contain a DelayNode; a cycle without one is
rendered as silence, as the specification requires. Every method may be
called from any thread; changes reach the renderer at its next render
quantum.
Methods
Inherited methods
Method details
getContext
public BaseAudioContext getContext()Returns
getNumberOfInputs
public int getNumberOfInputs()Returns
getNumberOfOutputs
public int getNumberOfOutputs()Returns
getChannelCount
public int getChannelCount()Returns
setChannelCount
public void setChannelCount(int count)Parameters
countint- 1 to 32, or less for nodes that restrict it
getChannelCountMode
public ChannelCountMode getChannelCountMode()Returns
setChannelCountMode
public void setChannelCountMode(ChannelCountMode mode)Parameters
modeChannelCountMode- the mode
getChannelInterpretation
public ChannelInterpretation getChannelInterpretation()Returns
setChannelInterpretation
public void setChannelInterpretation(ChannelInterpretation interpretation)Parameters
interpretationChannelInterpretation- the interpretation
connect
public AudioNode connect(AudioNode destination)destination.Parameters
destinationAudioNode- the node to feed
Returns
destination, so connections can be chainedconnect
public AudioNode connect(AudioNode destination, int output, int input)destination.
Connecting the same pair twice has no further effect.Parameters
destinationAudioNode- the node to feed
outputint- the output of this node
inputint- the input of
destination
Returns
destinationconnect
public void connect(AudioParam param)AudioParam, whose value then has this output,
mixed down to mono, added to it.Parameters
paramAudioParam- the parameter to modulate
connect
public void connect(AudioParam param, int output)AudioParam.Parameters
paramAudioParam- the parameter to modulate
outputint- the output of this node
disconnect
public void disconnect()disconnect
public void disconnect(int output)Parameters
outputint- the output of this node
disconnect
public void disconnect(AudioNode destination)destination.Parameters
destinationAudioNode- the node to stop feeding
disconnect
public void disconnect(AudioNode destination, int output, int input)Parameters
destinationAudioNode- the node fed
outputint- the output of this node
inputint- the input of
destination
disconnect
public void disconnect(AudioParam param)param.Parameters
paramAudioParam- the parameter to stop modulating