Added in API level 28

Limiter

class Limiter : DynamicsProcessing.Stage
kotlin.Any
   ↳ 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(inUse: Boolean, enabled: Boolean, linkGroup: Int, attackTime: Float, releaseTime: Float, ratio: Float, threshold: Float, postGain: Float)

Class constructor for Limiter Stage

Class Constructor for Limiter

Public methods
Float

gets attack time for limiter compressor in milliseconds (ms)

Int

Gets the linkGroup index for this Limiter Stage.

Float

gets the gain applied to the signal AFTER limiting.

Float

gets the limiter compressor ratio (N:1)

Float

gets release time for limiter compressor in milliseconds (ms)

Float

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

Unit
setAttackTime(attackTime: Float)

sets attack time for limiter compressor in milliseconds (ms)

Unit
setLinkGroup(linkGroup: Int)

Sets the linkGroup index for this limiter Stage.

Unit
setPostGain(postGain: Float)

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

Unit
setRatio(ratio: Float)

sets limiter compressor ratio (N:1)

Unit
setReleaseTime(releaseTime: Float)

sets release time for limiter compressor in milliseconds (ms)

Unit
setThreshold(threshold: Float)

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

String

Inherited functions

Public constructors

Limiter

Added in API level 28
Limiter(
    inUse: Boolean,
    enabled: Boolean,
    linkGroup: Int,
    attackTime: Float,
    releaseTime: Float,
    ratio: Float,
    threshold: Float,
    postGain: Float)

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.

Limiter

Added in API level 28
Limiter(cfg: DynamicsProcessing.Limiter!)

Class Constructor for Limiter

Parameters
cfg DynamicsProcessing.Limiter!: copy constructor

Public methods

getAttackTime

Added in API level 28
fun getAttackTime(): Float

gets attack time for limiter compressor in milliseconds (ms)

Return
Float attack time for limiter compressor in milliseconds (ms)

getLinkGroup

Added in API level 28
fun getLinkGroup(): Int

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

Return
Int linkGroup index.

getPostGain

Added in API level 28
fun getPostGain(): Float

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

Return
Float postGain value in decibels (dB)

getRatio

Added in API level 28
fun getRatio(): Float

gets the limiter compressor ratio (N:1)

Return
Float limiter compressor ratio (N:1)

getReleaseTime

Added in API level 28
fun getReleaseTime(): Float

gets release time for limiter compressor in milliseconds (ms)

Return
Float release time for limiter compressor in milliseconds (ms)

getThreshold

Added in API level 28
fun getThreshold(): Float

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.

Return
Float limiter compressor threshold in decibels (dB)

setAttackTime

Added in API level 28
fun setAttackTime(attackTime: Float): Unit

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
fun setLinkGroup(linkGroup: Int): Unit

Sets the linkGroup index for this limiter Stage.

Parameters
linkGroup Int: desired linkGroup index

setPostGain

Added in API level 28
fun setPostGain(postGain: Float): Unit

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
fun setRatio(ratio: Float): Unit

sets limiter compressor ratio (N:1)

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

setReleaseTime

Added in API level 28
fun setReleaseTime(releaseTime: Float): Unit

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
fun setThreshold(threshold: Float): Unit

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
fun toString(): String
Return
String a string representation of the object.