# DynamicsProcessing.EqBand

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# EqBand

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/audiofx/DynamicsProcessing.EqBand "View this page in Java")  

```
class EqBand : DynamicsProcessing.BandBase
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                        |||
| ↳ | [android.media.audiofx.DynamicsProcessing.BandBase](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase) ||
|   | ↳ | [android.media.audiofx.DynamicsProcessing.EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#) |

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

## Summary

|                                                                                                                                                                                                                                        Public constructors                                                                                                                                                                                                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#EqBand(android.media.audiofx.DynamicsProcessing.EqBand))`(`cfg:` `[DynamicsProcessing.EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#)!`)` Class constructor for EqBand                                                                                                                                                        |
| [EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#EqBand(kotlin.Boolean,%20kotlin.Float,%20kotlin.Float))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `cutoffFrequency:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `gain:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` Class constructor for EqBand |

|                                                                                                                                                                      Public methods                                                                                                                                                                      ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)   | [getGain](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#getGain())`()` gets current gain of band in decibels (dB)                                                                                                     |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)     | [setGain](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#setGain(kotlin.Float))`(`gain:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` sets current gain of band in decibels (dB) |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#toString())`()` <br />                                                                                                                                       |

| Inherited functions ||
|---|---|
| From class[BandBase](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase) |------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)     | [getCutoffFrequency](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#getCutoffFrequency())`()` <br /> gets cutoffFrequency for this band in Hertz (Hz) <br />                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isEnabled](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#isEnabled())`()` <br /> returns enabled state of the band <br />                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [setCutoffFrequency](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#setCutoffFrequency(kotlin.Float))`(`frequency:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` <br /> 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. <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [setEnabled](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#setEnabled(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> sets enabled state of the band <br />                                                                                                                                                                                                                                                                                                            | ||

## Public constructors

### EqBand

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
EqBand(cfg: DynamicsProcessing.EqBand!)
```

Class constructor for EqBand

|                                                                      Parameters                                                                       ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------|
| `cfg` | [DynamicsProcessing.EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand#)!:copy constructor |

### EqBand

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

Class constructor for EqBand

|                                                                                                                                                                                                         Parameters                                                                                                                                                                                                         ||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `enabled`         | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):true if this band is currently used to process sound. When false, the band is effectively muted and sound set to zero.                                                                                                                                                                                               |
| `cutoffFrequency` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):of equalizer band in decibels (dB). A gain of 0 dB means no change in level.                                                                                                                                                                                                                                             |

## Public methods

### getGain

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getGain(): Float
```

gets current gain of band in decibels (dB)

|                                                        Return                                                         ||
|--------------------------------------------------------------------------------|---------------------------------------|
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | current gain of band in decibels (dB) |

### setGain

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setGain(gain: Float): Unit
```

sets current gain of band in decibels (dB)

|                                                   Parameters                                                    ||
|--------|---------------------------------------------------------------------------------------------------------|
| `gain` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):desired in decibels (db) |

### toString

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |