fm.liveswitch.AudioSynchronizer Class Reference

An audio pipe for synchronizing playout with other streams. More...

Public Member Functions

void activate (boolean master, fm.liveswitch.ISynchronizer[] slaves)
 Activates synchronizing. More...
 
 AudioSynchronizer (fm.liveswitch.AudioFormat format)
 Initializes a new instance of the fm.liveswitch.AudioSynchronizer class. More...
 
boolean getActive ()
 Gets whether synchronization is active. More...
 
long getHeadSystemTimestamp ()
 Gets the system timestamp from the head of the queue. More...
 
String getLabel ()
 Gets a label that identifies this class. More...
 
boolean getMaster ()
 Gets whether this is the master. More...
 
long getMasterSystemTimestamp ()
 Gets the master system timestamp. More...
 
long getMaxData ()
 Gets the maximum amount of data to allow in the queue, in bytes. More...
 
int getMaxDelay ()
 Gets the maximum amount of delay to allow in the queue, in milliseconds. More...
 
int getQueueCount ()
 Gets the number of pending frames. More...
 
fm.liveswitch.ISynchronizer[] getSlaves ()
 Gets the slaves. More...
 
void setMasterSystemTimestamp (long value)
 Sets the master system timestamp. More...
 
void setMaxData (long value)
 Sets the maximum amount of data to allow in the queue, in bytes. More...
 
void setMaxDelay (int value)
 Sets the maximum amount of delay to allow in the queue, in milliseconds. More...
 
- Public Member Functions inherited from fm.liveswitch.AudioPipe
 AudioPipe (fm.liveswitch.AudioFormat inputFormat, fm.liveswitch.AudioFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.AudioPipe class. More...
 
 AudioPipe (fm.liveswitch.AudioFormat outputFormat)
 Initializes a new instance of the fm.liveswitch.AudioPipe class. More...
 
fm.liveswitch.AudioConfig getConfig ()
 Gets the output configuration. More...
 
double getGain ()
 Gets a value indicating the gain (input amplification) of this sink. More...
 
fm.liveswitch.AudioConfig getInputConfig ()
 Gets the input configuration. More...
 
fm.liveswitch.AudioConfig getOutputConfig ()
 Gets the output configuration. More...
 
double getVolume ()
 Gets a value indicating the volume (output resistance) of this source. More...
 
boolean processFrame (fm.liveswitch.AudioFrame frame)
 Processes a frame. More...
 
void setGain (double value)
 Sets a value indicating the gain (input amplification) of this sink. More...
 
void setVolume (double value)
 Sets a value indicating the volume (output resistance) of this source. 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.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...
 
- Public Member Functions inherited from fm.liveswitch.IMediaElement
abstract boolean destroy ()
 Destroys this instance. More...
 
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...
 

Protected Member Functions

void doDestroy ()
 Destroys this instance. More...
 
void doProcessFrame (fm.liveswitch.AudioFrame frame, fm.liveswitch.AudioBuffer inputBuffer)
 Processes a frame. More...
 
- Protected Member Functions inherited from fm.liveswitch.AudioPipe
fm.liveswitch.AudioFrame createFrame (fm.liveswitch.AudioBuffer buffer)
 Creates a frame. More...
 
fm.liveswitch.IAudioInputCollection createInputCollection (fm.liveswitch.IAudioOutput output)
 Creates an input collection. More...
 
fm.liveswitch.IAudioOutputCollection createOutputCollection (fm.liveswitch.IAudioInput input)
 Creates an output collection. More...
 
void raiseFrame (fm.liveswitch.AudioFrame frame)
 Raises a frame. More...
 
- 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 pipe for synchronizing playout with other streams.

Constructor & Destructor Documentation

◆ AudioSynchronizer()

fm.liveswitch.AudioSynchronizer.AudioSynchronizer ( fm.liveswitch.AudioFormat  format)

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

Parameters
formatThe format.

Member Function Documentation

◆ activate()

void fm.liveswitch.AudioSynchronizer.activate ( boolean  master,
fm.liveswitch.ISynchronizer[]  slaves 
)

Activates synchronizing.

Parameters
masterWhether this is a master.
slavesThe slaves, if this is a master.

Implements fm.liveswitch.ISynchronizer.

◆ doDestroy()

void fm.liveswitch.AudioSynchronizer.doDestroy ( )
protected

Destroys this instance.

◆ doProcessFrame()

void fm.liveswitch.AudioSynchronizer.doProcessFrame ( fm.liveswitch.AudioFrame  frame,
fm.liveswitch.AudioBuffer  inputBuffer 
)
protected

Processes a frame.

Parameters
frameThe frame.
inputBufferThe input buffer.

◆ getActive()

boolean fm.liveswitch.AudioSynchronizer.getActive ( )

Gets whether synchronization is active.

Implements fm.liveswitch.ISynchronizer.

◆ getHeadSystemTimestamp()

long fm.liveswitch.AudioSynchronizer.getHeadSystemTimestamp ( )

Gets the system timestamp from the head of the queue.

◆ getLabel()

String fm.liveswitch.AudioSynchronizer.getLabel ( )

Gets a label that identifies this class.

Implements fm.liveswitch.IMediaElement.

◆ getMaster()

boolean fm.liveswitch.AudioSynchronizer.getMaster ( )

Gets whether this is the master.

Implements fm.liveswitch.ISynchronizer.

◆ getMasterSystemTimestamp()

long fm.liveswitch.AudioSynchronizer.getMasterSystemTimestamp ( )

Gets the master system timestamp.

Implements fm.liveswitch.ISynchronizer.

◆ getMaxData()

long fm.liveswitch.AudioSynchronizer.getMaxData ( )

Gets the maximum amount of data to allow in the queue, in bytes.

◆ getMaxDelay()

int fm.liveswitch.AudioSynchronizer.getMaxDelay ( )

Gets the maximum amount of delay to allow in the queue, in milliseconds.

◆ getQueueCount()

int fm.liveswitch.AudioSynchronizer.getQueueCount ( )

Gets the number of pending frames.

◆ getSlaves()

fm.liveswitch.ISynchronizer [] fm.liveswitch.AudioSynchronizer.getSlaves ( )

Gets the slaves.

Implements fm.liveswitch.ISynchronizer.

◆ setMasterSystemTimestamp()

void fm.liveswitch.AudioSynchronizer.setMasterSystemTimestamp ( long  value)

Sets the master system timestamp.

Implements fm.liveswitch.ISynchronizer.

◆ setMaxData()

void fm.liveswitch.AudioSynchronizer.setMaxData ( long  value)

Sets the maximum amount of data to allow in the queue, in bytes.

◆ setMaxDelay()

void fm.liveswitch.AudioSynchronizer.setMaxDelay ( int  value)

Sets the maximum amount of delay to allow in the queue, in milliseconds.