DynamicsProcessing.Limiter


public static final class DynamicsProcessing.Limiter
extends DynamicsProcessing.Stage

java.lang.Object
   ↳ android.media.audiofx.DynamicsProcessing.Stage
     ↳ android.media.audiofx.DynamicsProcessing.Limiter


Class for Limiter Stage Limiter is a single band compressor at the end of the processing chain, commonly used to protect the signal from overloading and distortion. Limiters have multiple controllable parameters: enabled/disabled, linkGroup, attackTime, releaseTime, ratio, threshold, and postGain.

Limiters can be linked in groups across multiple channels. Linked limiters will trigger the same limiting if any of the linked limiters starts compressing.

Summary

Public constructors

Limiter(DynamicsProcessing.Limiter cfg)

Class Constructor for Limiter

Limiter(boolean inUse, boolean enabled, int linkGroup, float attackTime, float releaseTime, float ratio, float threshold, float postGain)

Class constructor for Limiter Stage

Public methods

float getAttackTime()

gets attack time for limiter compressor in milliseconds (ms)

int getLinkGroup()

Gets the linkGroup index for this Limiter Stage.

float getPostGain()

gets the gain applied to the signal AFTER limiting.

float getRatio()

gets the limiter compressor ratio (N:1)

float getReleaseTime()

gets release time for limiter compressor in milliseconds (ms)

float getThreshold()

gets the limiter compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).

void setAttackTime(float attackTime)

sets attack time for limiter compressor in milliseconds (ms)

void setLinkGroup(int linkGroup)

Sets the linkGroup index for this limiter Stage.

void setPostGain(float postGain)

sets the gain to be applied to the siganl AFTER the limiter.

void setRatio(float ratio)

sets limiter compressor ratio (N:1)

void setReleaseTime(float releaseTime)

sets release time for limiter compressor in milliseconds (ms)

void setThreshold(float threshold)

sets the limiter compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).

String toString()

Returns a string representation of the object.

Inherited methods

Public constructors

Limiter

Added in API level 28
public Limiter (DynamicsProcessing.Limiter cfg)

Class Constructor for Limiter

Parameters
cfg DynamicsProcessing.Limiter: copy constructor

Limiter

Added in API level 28
public Limiter (boolean inUse, 
                boolean enabled, 
                int linkGroup, 
                float attackTime, 
                float releaseTime, 
                float ratio, 
                float threshold, 
                float postGain)

Class constructor for Limiter Stage

Parameters
inUse boolean: true if MBC stage will be used, false otherwise.

enabled boolean: true if MBC stage is enabled/disabled. This can be changed while effect is running

linkGroup int: index of group assigned to this Limiter. Only limiters that share the same linkGroup index will react together.

attackTime float: Attack Time for limiter compressor in milliseconds (ms)

releaseTime float: Release Time for limiter compressor in milliseconds (ms)

ratio float: Limiter Compressor ratio (N:1) (input:output)

threshold float: Limiter Compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).

postGain float: Gain applied to the signal AFTER compression.

Public methods

getAttackTime

Added in API level 28
public float getAttackTime ()

gets attack time for limiter compressor in milliseconds (ms)

Returns
float attack time for limiter compressor in milliseconds (ms)

getLinkGroup

Added in API level 28
public int getLinkGroup ()

Gets the linkGroup index for this Limiter Stage. Only limiters that share the same linkGroup index will react together.

Returns
int linkGroup index.

getPostGain

Added in API level 28
public float getPostGain ()

gets the gain applied to the signal AFTER limiting. Measured in decibels (dB) where 0 dB means no level change

Returns
float postGain value in decibels (dB)

getRatio

Added in API level 28
public float getRatio ()

gets the limiter compressor ratio (N:1)

Returns
float limiter compressor ratio (N:1)

getReleaseTime

Added in API level 28
public float getReleaseTime ()

gets release time for limiter compressor in milliseconds (ms)

Returns
float release time for limiter compressor in milliseconds (ms)

getThreshold

Added in API level 28
public float getThreshold ()

gets the limiter compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS). Thresholds are negative. A threshold of 0 dB means no limiting will take place.

Returns
float limiter compressor threshold in decibels (dB)

setAttackTime

Added in API level 28
public void setAttackTime (float attackTime)

sets attack time for limiter compressor in milliseconds (ms)

Parameters
attackTime float: desired for limiter compressor in milliseconds (ms)

setLinkGroup

Added in API level 28
public void setLinkGroup (int linkGroup)

Sets the linkGroup index for this limiter Stage.

Parameters
linkGroup int: desired linkGroup index

setPostGain

Added in API level 28
public void setPostGain (float postGain)

sets the gain to be applied to the siganl AFTER the limiter. Measured in decibels (dB), where 0 dB means no level change.

Parameters
postGain float: desired value in decibels (dB)

setRatio

Added in API level 28
public void setRatio (float ratio)

sets limiter compressor ratio (N:1)

Parameters
ratio float: desired for the limiter compressor (N:1)

setReleaseTime

Added in API level 28
public void setReleaseTime (float releaseTime)

sets release time for limiter compressor in milliseconds (ms)

Parameters
releaseTime float: desired for limiter compressor in milliseconds (ms)

setThreshold

Added in API level 28
public void setThreshold (float threshold)

sets the limiter compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS). Thresholds are negative. A threshold of 0 dB means no limiting will take place.

Parameters
threshold float: desired for limiter compressor in decibels(dB)

toString

Added in API level 28
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.