fm.liveswitch.SoundReframer Class Reference

A pipe that reframes sound chunks into different durations. More...

Public Member Functions

boolean getDisableTimestampReset ()
 Gets whether the timestamp should be reset using the wall clock after fm.liveswitch.SoundReframer#getTimestampResetInterval milliseconds elapse between frames. More...
 
boolean getForceTimestampReset ()
 Gets whether the timestamp should be reset before the next frame is processed. More...
 
int getFrameDuration ()
 Gets the frame duration in milliseconds. More...
 
String getLabel ()
 Gets a label that identifies this class. More...
 
int getTimestampResetInterval ()
 Gets the amount of time in milliseconds between audio frames that will trigger a reset of the timestamp to the wall clock. More...
 
void setDisableTimestampReset (boolean value)
 Sets whether the timestamp should be reset using the wall clock after fm.liveswitch.SoundReframer#getTimestampResetInterval milliseconds elapse between frames. More...
 
void setForceTimestampReset (boolean value)
 Sets whether the timestamp should be reset before the next frame is processed. More...
 
void setTimestampResetInterval (int value)
 Sets the amount of time in milliseconds between audio frames that will trigger a reset of the timestamp to the wall clock. More...
 
 SoundReframer (fm.liveswitch.AudioConfig config)
 Initializes a new instance of the fm.liveswitch.SoundReframer class. More...
 
 SoundReframer (fm.liveswitch.AudioConfig config, int frameDuration)
 Initializes a new instance of the fm.liveswitch.SoundReframer class. More...
 
 SoundReframer (fm.liveswitch.IAudioOutput input, int frameDuration)
 Initializes a new instance of the fm.liveswitch.SoundReframer class. 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

A pipe that reframes sound chunks into different durations.

Constructor & Destructor Documentation

◆ SoundReframer() [1/3]

fm.liveswitch.SoundReframer.SoundReframer ( fm.liveswitch.AudioConfig  config)

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

Parameters
configThe configuration.

◆ SoundReframer() [2/3]

fm.liveswitch.SoundReframer.SoundReframer ( fm.liveswitch.AudioConfig  config,
int  frameDuration 
)

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

Parameters
configThe configuration.
frameDurationThe frame duration.

◆ SoundReframer() [3/3]

fm.liveswitch.SoundReframer.SoundReframer ( fm.liveswitch.IAudioOutput  input,
int  frameDuration 
)

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

Parameters
inputThe input.
frameDurationThe frame duration.

Member Function Documentation

◆ doDestroy()

void fm.liveswitch.SoundReframer.doDestroy ( )
protected

Destroys this instance.

◆ doProcessFrame()

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

Processes a frame.

Parameters
frameThe frame.
inputBufferThe input buffer.

◆ getDisableTimestampReset()

boolean fm.liveswitch.SoundReframer.getDisableTimestampReset ( )

Gets whether the timestamp should be reset using the wall clock after fm.liveswitch.SoundReframer#getTimestampResetInterval milliseconds elapse between frames.

◆ getForceTimestampReset()

boolean fm.liveswitch.SoundReframer.getForceTimestampReset ( )

Gets whether the timestamp should be reset before the next frame is processed.

◆ getFrameDuration()

int fm.liveswitch.SoundReframer.getFrameDuration ( )

Gets the frame duration in milliseconds.

Defaults to 20.

◆ getLabel()

String fm.liveswitch.SoundReframer.getLabel ( )

Gets a label that identifies this class.

Implements fm.liveswitch.IMediaElement.

◆ getTimestampResetInterval()

int fm.liveswitch.SoundReframer.getTimestampResetInterval ( )

Gets the amount of time in milliseconds between audio frames that will trigger a reset of the timestamp to the wall clock.

Defaults to 1000ms.

◆ setDisableTimestampReset()

void fm.liveswitch.SoundReframer.setDisableTimestampReset ( boolean  value)

Sets whether the timestamp should be reset using the wall clock after fm.liveswitch.SoundReframer#getTimestampResetInterval milliseconds elapse between frames.

◆ setForceTimestampReset()

void fm.liveswitch.SoundReframer.setForceTimestampReset ( boolean  value)

Sets whether the timestamp should be reset before the next frame is processed.

◆ setTimestampResetInterval()

void fm.liveswitch.SoundReframer.setTimestampResetInterval ( int  value)

Sets the amount of time in milliseconds between audio frames that will trigger a reset of the timestamp to the wall clock.

Defaults to 1000ms.