fm.liveswitch.AudioFrame Class Reference

An audio frame. More...

Public Member Functions

 AudioFrame (int duration)
 Initializes a new instance of the fm.liveswitch.AudioFrame class. More...
 
 AudioFrame (int duration, fm.liveswitch.AudioBuffer buffer)
 Initializes a new instance of the fm.liveswitch.AudioFrame class. More...
 
 AudioFrame (int duration, fm.liveswitch.AudioBuffer[] buffers)
 Initializes a new instance of the fm.liveswitch.AudioFrame class. More...
 
fm.liveswitch.AudioFrame clone ()
 Clones this instance. More...
 
fm.liveswitch.AudioFrame createInstance ()
 Creates a new instance. More...
 
int getDuration ()
 Gets the duration. More...
 
void setDuration (int value)
 Sets the duration. More...
 
String toString ()
 Returns a string that represents this instance. 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...
 

Static Public Member Functions

static int calculateTimestampDelta (int duration, int clockRate)
 Calculates a timestamp delta given a duration and clock rate. More...
 
static fm.liveswitch.AudioFrame generatePcmFrame (int duration, fm.liveswitch.AudioConfig config)
 Generates a silent audio frame for the given duration and configuration. More...
 

Protected Member Functions

fm.liveswitch.AudioBufferCollection createMediaBufferCollection ()
 Creates a media buffer collection. 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 frame.

Constructor & Destructor Documentation

◆ AudioFrame() [1/3]

fm.liveswitch.AudioFrame.AudioFrame ( int  duration)

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

Parameters
durationThe duration.

◆ AudioFrame() [2/3]

fm.liveswitch.AudioFrame.AudioFrame ( int  duration,
fm.liveswitch.AudioBuffer  buffer 
)

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

Parameters
durationThe duration.
bufferThe buffer.

◆ AudioFrame() [3/3]

fm.liveswitch.AudioFrame.AudioFrame ( int  duration,
fm.liveswitch.AudioBuffer[]  buffers 
)

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

Parameters
durationThe duration.
buffersThe buffers.

Member Function Documentation

◆ calculateTimestampDelta()

static int fm.liveswitch.AudioFrame.calculateTimestampDelta ( int  duration,
int  clockRate 
)
static

Calculates a timestamp delta given a duration and clock rate.

Parameters
durationThe duration in milliseconds.
clockRateThe clock rate.

◆ clone()

fm.liveswitch.AudioFrame fm.liveswitch.AudioFrame.clone ( )

Clones this instance.

◆ createInstance()

fm.liveswitch.AudioFrame fm.liveswitch.AudioFrame.createInstance ( )

Creates a new instance.

◆ createMediaBufferCollection()

fm.liveswitch.AudioBufferCollection fm.liveswitch.AudioFrame.createMediaBufferCollection ( )
protected

Creates a media buffer collection.

◆ generatePcmFrame()

static fm.liveswitch.AudioFrame fm.liveswitch.AudioFrame.generatePcmFrame ( int  duration,
fm.liveswitch.AudioConfig  config 
)
static

Generates a silent audio frame for the given duration and configuration.

Parameters
durationThe duration.
configThe configuration.

◆ getDuration()

int fm.liveswitch.AudioFrame.getDuration ( )

Gets the duration.

◆ setDuration()

void fm.liveswitch.AudioFrame.setDuration ( int  value)

Sets the duration.

◆ toString()

String fm.liveswitch.AudioFrame.toString ( )

Returns a string that represents this instance.