Added in API level 28

EqBand


class EqBand : DynamicsProcessing.BandBase

Class for Equalizer Bands Equalizer bands have three controllable parameters: enabled/disabled, cutoffFrequency and gain

Summary

Public constructors

Class constructor for EqBand

EqBand(enabled: Boolean, cutoffFrequency: Float, gain: Float)

Class constructor for EqBand

Public methods
Float

gets current gain of band in decibels (dB)

Unit
setGain(gain: Float)

sets current gain of band in decibels (dB)

String

Inherited functions
Float getCutoffFrequency()

gets cutoffFrequency for this band in Hertz (Hz)

Boolean isEnabled()

returns enabled state of the band

Unit setCutoffFrequency(frequency: Float)

sets topmost frequency number (in Hz) this band will process. The effective bandwidth for the band is then computed using this and the previous band topmost frequency (or 0 Hz for band number 0). Frequencies are expected to increase with band number, thus band 0 cutoffFrequency <= band 1 cutoffFrequency, and so on.

Unit setEnabled(enabled: Boolean)

sets enabled state of the band

Public constructors

EqBand

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

Class constructor for EqBand

Parameters
cfg DynamicsProcessing.EqBand!: copy constructor

EqBand

Added in API level 28
EqBand(
    enabled: Boolean,
    cutoffFrequency: Float,
    gain: Float)

Class constructor for EqBand

Parameters
enabled Boolean: true if this band is currently used to process sound. When false, the band is effectively muted and sound set to zero.
cutoffFrequency Float: topmost frequency number (in Hz) this band will process. The effective bandwidth for the band is then computed using this and the previous band topmost frequency (or 0 Hz for band number 0). Frequencies are expected to increase with band number, thus band 0 cutoffFrequency <= band 1 cutoffFrequency, and so on.
gain Float: of equalizer band in decibels (dB). A gain of 0 dB means no change in level.

Public methods

getGain

Added in API level 28
fun getGain(): Float

gets current gain of band in decibels (dB)

Return
Float current gain of band in decibels (dB)

setGain

Added in API level 28
fun setGain(gain: Float): Unit

sets current gain of band in decibels (dB)

Parameters
gain Float: desired in decibels (db)

toString

Added in API level 28
fun toString(): String
Return
String a string representation of the object.