fm.liveswitch.AudioTrack Class Reference

An audio chain. More...

Public Member Functions

void addOnLevel (fm.liveswitch.IAction1< Double > value)
 Adds a handler that is raised periodically when the audio's level is calculated. More...
 
 AudioTrack ()
 Initializes a new instance of the fm.liveswitch.AudioTrack class. More...
 
 AudioTrack (fm.liveswitch.IAudioElement element)
 Initializes a new instance of the fm.liveswitch.AudioTrack class. More...
 
 AudioTrack (fm.liveswitch.AudioTrack[] tracks)
 Initializes a new instance of the fm.liveswitch.AudioTrack class. More...
 
boolean destroy ()
 Destroys this media track. More...
 
fm.liveswitch.AudioConfig getConfig ()
 Gets the configuration. More...
 
fm.liveswitch.IAudioElement[] getElements ()
 Gets the elements. More...
 
double getGain ()
 Gets a value indicating the gain (input amplification) of this track. More...
 
String getLabel ()
 Gets a label that identifies this class. More...
 
int getLevelInterval ()
 Gets the interval in milliseconds between fm.liveswitch.AudioTrack#addOnLevel events. More...
 
double getVolume ()
 Gets a value indicating the volume (output resistance) of this track. More...
 
void removeOnLevel (fm.liveswitch.IAction1< Double > value)
 Removes a handler that is raised periodically when the audio's level is calculated. More...
 
void setGain (double value)
 Sets a value indicating the gain (input amplification) of this track. More...
 
void setLevelInterval (int value)
 Sets the interval in milliseconds between fm.liveswitch.AudioTrack#addOnLevel events. More...
 
void setVolume (double value)
 Sets a value indicating the volume (output resistance) of this track. More...
 
- Public Member Functions inherited from fm.liveswitch.MediaTrackBase
abstract void addOnDestroyed (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the track is destroyed. More...
 
abstract void addOnMuted (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the track is muted. More...
 
abstract void addOnStarted (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the track is started. More...
 
abstract void addOnStopped (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the track is stopped. More...
 
abstract void addOnUnmuted (fm.liveswitch.IAction0 value)
 Adds a handler that is raised when the track is unmuted. More...
 
abstract fm.liveswitch.Future< Object > changeSinkOutput (fm.liveswitch.SinkOutput sinkOutput)
 Changes the sink output while the media track is active. More...
 
abstract fm.liveswitch.Future< Object > changeSourceInput (fm.liveswitch.SourceInput sourceInput)
 Changes the source input while the media track is active. More...
 
abstract boolean getMuted ()
 Gets a value indicating whether this track is muted. More...
 
abstract fm.liveswitch.SinkOutput getSinkOutput ()
 Gets the current sink output. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.SinkOutput[]> getSinkOutputs ()
 Gets the available sink outputs. More...
 
abstract fm.liveswitch.SourceInput getSourceInput ()
 Gets the current source input. More...
 
abstract fm.liveswitch.Future< fm.liveswitch.SourceInput[]> getSourceInputs ()
 Gets the available source inputs. More...
 
abstract void removeOnDestroyed (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the track is destroyed. More...
 
abstract void removeOnMuted (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the track is muted. More...
 
abstract void removeOnStarted (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the track is started. More...
 
abstract void removeOnStopped (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the track is stopped. More...
 
abstract void removeOnUnmuted (fm.liveswitch.IAction0 value)
 Removes a handler that is raised when the track is unmuted. More...
 
abstract void setMuted (boolean value)
 Sets a value indicating whether this track is muted. More...
 
abstract void setSinkOutput (fm.liveswitch.SinkOutput value)
 Sets the current sink output. More...
 
abstract void setSourceInput (fm.liveswitch.SourceInput value)
 Sets the current source input. More...
 
- Public Member Functions inherited from fm.liveswitch.Dynamic
java.util.HashMap< String, Object > getDynamicProperties ()
 Gets all dynamic properties on this instance. More...
 
Object getDynamicValue (String key)
 Gets a property value from the local cache. More...
 
void setDynamicValue (String key, Object value)
 Sets a property value in the local cache. More...
 
boolean unsetDynamicValue (String key)
 Removes a property value from the local cache. More...
 
- Public Member Functions inherited from fm.liveswitch.IMediaElement
abstract boolean getDeactivated ()
 Gets a value indicating whether this instance is deactivated. More...
 
abstract boolean getDisabled ()
 Gets a value indicating whether this instance is disabled. More...
 
abstract boolean getMuted ()
 Gets a value indicating whether this instance is muted. More...
 
abstract boolean getPaused ()
 Gets a value indicating whether this instance is paused. More...
 
abstract boolean getPersistent ()
 Gets a value indicating whether this instance is persistent. More...
 
abstract void setDeactivated (boolean value)
 Sets a value indicating whether this instance is deactivated. More...
 
abstract void setMuted (boolean value)
 Sets a value indicating whether this instance is muted. More...
 
- Public Member Functions inherited from fm.liveswitch.IElement
abstract String getExternalId ()
 Gets the external identifier. More...
 
abstract String getId ()
 Gets the identifier. More...
 
abstract String getPipelineJson ()
 Gets the pipeline JSON with this as the central point. More...
 
abstract void setExternalId (String value)
 Sets the external identifier. More...
 

Protected Member Functions

void addElement (fm.liveswitch.IAudioElement element)
 Adds an element. More...
 
fm.liveswitch.IAudioInput[] arrayFromInputs (java.util.ArrayList< fm.liveswitch.IAudioInput > inputs)
 Creates an array of inputs from a list of inputs. More...
 
fm.liveswitch.IAudioOutput[] arrayFromOutputs (java.util.ArrayList< fm.liveswitch.IAudioOutput > outputs)
 Creates an array of outputs from a list of outputs. More...
 
fm.liveswitch.AudioSink[] arrayFromSinks (java.util.ArrayList< fm.liveswitch.AudioSink > sinks)
 Creates an array of sinks from a list of sinks. More...
 
fm.liveswitch.AudioBranch branchFromTracks (fm.liveswitch.AudioTrack[] tracks)
 Creates a branch from an array of tracks. More...
 
boolean isBranch (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is a branch. More...
 
boolean isInput (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is an input. More...
 
boolean isOutput (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is an output. More...
 
boolean isPipe (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is a pipe. More...
 
boolean isSink (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is a sink. More...
 
boolean isSource (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is a source. More...
 
boolean isStream (fm.liveswitch.IAudioElement element)
 Determines whether the specified element is a stream. More...
 
- Protected Member Functions inherited from fm.liveswitch.MediaTrackBase
 MediaTrackBase ()
 
- Protected Member Functions inherited from fm.liveswitch.Dynamic
 Dynamic ()
 
- Protected Member Functions inherited from fm.liveswitch.Serializable
boolean getIsDirty ()
 Gets a value indicating whether this instance is dirty. More...
 
 Serializable ()
 Initializes a new instance of the fm.liveswitch.Serializable class. More...
 
void setIsDirty (boolean value)
 Sets a value indicating whether this instance is dirty. More...
 

Detailed Description

An audio chain.

Constructor & Destructor Documentation

◆ AudioTrack() [1/3]

fm.liveswitch.AudioTrack.AudioTrack ( )

Initializes a new instance of the fm.liveswitch.AudioTrack class.

◆ AudioTrack() [2/3]

fm.liveswitch.AudioTrack.AudioTrack ( fm.liveswitch.IAudioElement  element)

Initializes a new instance of the fm.liveswitch.AudioTrack class.

Parameters
elementThe element.

◆ AudioTrack() [3/3]

fm.liveswitch.AudioTrack.AudioTrack ( fm.liveswitch.AudioTrack[]  tracks)

Initializes a new instance of the fm.liveswitch.AudioTrack class.

Parameters
tracksThe branch of tracks.

Member Function Documentation

◆ addElement()

void fm.liveswitch.AudioTrack.addElement ( fm.liveswitch.IAudioElement  element)
protected

Adds an element.

Parameters
element

◆ addOnLevel()

void fm.liveswitch.AudioTrack.addOnLevel ( fm.liveswitch.IAction1< Double >  value)

Adds a handler that is raised periodically when the audio's level is calculated.

Implements fm.liveswitch.IAudioTrack.

◆ arrayFromInputs()

fm.liveswitch.IAudioInput [] fm.liveswitch.AudioTrack.arrayFromInputs ( java.util.ArrayList< fm.liveswitch.IAudioInput inputs)
protected

Creates an array of inputs from a list of inputs.

Parameters
inputsThe list of inputs.

◆ arrayFromOutputs()

fm.liveswitch.IAudioOutput [] fm.liveswitch.AudioTrack.arrayFromOutputs ( java.util.ArrayList< fm.liveswitch.IAudioOutput outputs)
protected

Creates an array of outputs from a list of outputs.

Parameters
outputsThe list of outputs.

◆ arrayFromSinks()

fm.liveswitch.AudioSink [] fm.liveswitch.AudioTrack.arrayFromSinks ( java.util.ArrayList< fm.liveswitch.AudioSink sinks)
protected

Creates an array of sinks from a list of sinks.

Parameters
sinksThe list of sinks.

◆ branchFromTracks()

fm.liveswitch.AudioBranch fm.liveswitch.AudioTrack.branchFromTracks ( fm.liveswitch.AudioTrack[]  tracks)
protected

Creates a branch from an array of tracks.

Parameters
tracksThe tracks.

◆ destroy()

boolean fm.liveswitch.AudioTrack.destroy ( )

Destroys this media track.

Implements fm.liveswitch.IMediaTrack.

◆ getConfig()

fm.liveswitch.AudioConfig fm.liveswitch.AudioTrack.getConfig ( )

Gets the configuration.

◆ getElements()

fm.liveswitch.IAudioElement [] fm.liveswitch.AudioTrack.getElements ( )

Gets the elements.

◆ getGain()

double fm.liveswitch.AudioTrack.getGain ( )

Gets a value indicating the gain (input amplification) of this track.

Any value greater than or equal to 0.0 is acceptable.

Implements fm.liveswitch.IAudioTrack.

◆ getLabel()

String fm.liveswitch.AudioTrack.getLabel ( )

Gets a label that identifies this class.

Implements fm.liveswitch.IMediaElement.

◆ getLevelInterval()

int fm.liveswitch.AudioTrack.getLevelInterval ( )

Gets the interval in milliseconds between fm.liveswitch.AudioTrack#addOnLevel events.

Defaults to 200.

Implements fm.liveswitch.IAudioTrack.

◆ getVolume()

double fm.liveswitch.AudioTrack.getVolume ( )

Gets a value indicating the volume (output resistance) of this track.

Valid value range is 0.0 to 1.0, inclusive.

Implements fm.liveswitch.IAudioTrack.

◆ isBranch()

boolean fm.liveswitch.AudioTrack.isBranch ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is a branch.

Parameters
elementThe element.

◆ isInput()

boolean fm.liveswitch.AudioTrack.isInput ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is an input.

Parameters
elementThe element.

◆ isOutput()

boolean fm.liveswitch.AudioTrack.isOutput ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is an output.

Parameters
elementThe element.

◆ isPipe()

boolean fm.liveswitch.AudioTrack.isPipe ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is a pipe.

Parameters
elementThe element.

◆ isSink()

boolean fm.liveswitch.AudioTrack.isSink ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is a sink.

Parameters
elementThe element.

◆ isSource()

boolean fm.liveswitch.AudioTrack.isSource ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is a source.

Parameters
elementThe element.

◆ isStream()

boolean fm.liveswitch.AudioTrack.isStream ( fm.liveswitch.IAudioElement  element)
protected

Determines whether the specified element is a stream.

Parameters
elementThe element.

◆ removeOnLevel()

void fm.liveswitch.AudioTrack.removeOnLevel ( fm.liveswitch.IAction1< Double >  value)

Removes a handler that is raised periodically when the audio's level is calculated.

Implements fm.liveswitch.IAudioTrack.

◆ setGain()

void fm.liveswitch.AudioTrack.setGain ( double  value)

Sets a value indicating the gain (input amplification) of this track.

Any value greater than or equal to 0.0 is acceptable.

Implements fm.liveswitch.IAudioTrack.

◆ setLevelInterval()

void fm.liveswitch.AudioTrack.setLevelInterval ( int  value)

Sets the interval in milliseconds between fm.liveswitch.AudioTrack#addOnLevel events.

Defaults to 200.

Implements fm.liveswitch.IAudioTrack.

◆ setVolume()

void fm.liveswitch.AudioTrack.setVolume ( double  value)

Sets a value indicating the volume (output resistance) of this track.

Valid value range is 0.0 to 1.0, inclusive.

Implements fm.liveswitch.IAudioTrack.