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

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

Class constructor for Limiter Stage

DynamicsProcessing.Limiter(DynamicsProcessing.Limiter cfg)

Class Constructor for Limiter

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

DynamicsProcessing.Limiter

added in API level 28
public DynamicsProcessing.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.

DynamicsProcessing.Limiter

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

Class Constructor for Limiter

Parameters
cfg DynamicsProcessing.Limiter: copy constructor

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. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
String a string representation of the object.