Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

DynamicsProcessing.Channel

public static final class DynamicsProcessing.Channel
extends Object

java.lang.Object
   ↳ android.media.audiofx.DynamicsProcessing.Channel


Class for Channel configuration parameters. It is composed of multiple stages, which can be used/enabled independently. Stages not used or disabled will be bypassed and the sound would be unaffected by them.

Summary

Public constructors

DynamicsProcessing.Channel(float inputGain, boolean preEqInUse, int preEqBandCount, boolean mbcInUse, int mbcBandCount, boolean postEqInUse, int postEqBandCount, boolean limiterInUse)

Class constructor for Channel configuration.

DynamicsProcessing.Channel(DynamicsProcessing.Channel cfg)

Class constructor for Channel configuration

Public methods

float getInputGain()

Gets inputGain value in decibels (dB).

DynamicsProcessing.Limiter getLimiter()

Gets Limiter configuration stage

DynamicsProcessing.Mbc getMbc()

Gets Mbc configuration stage

DynamicsProcessing.MbcBand getMbcBand(int band)

Gets MbcBand configuration for Mbc stage, for given band index.

DynamicsProcessing.Eq getPostEq()

Gets PostEq configuration stage

DynamicsProcessing.EqBand getPostEqBand(int band)

Gets EqBand for PostEq stage for given band index.

DynamicsProcessing.Eq getPreEq()

Gets PreEq configuration stage

DynamicsProcessing.EqBand getPreEqBand(int band)

Gets EqBand for PreEq stage for given band index.

void setInputGain(float inputGain)

Sets inputGain value in decibels (dB).

void setLimiter(DynamicsProcessing.Limiter limiter)

Sets Limiter configuration stage.

void setMbc(DynamicsProcessing.Mbc mbc)

Sets Mbc configuration stage.

void setMbcBand(int band, DynamicsProcessing.MbcBand mbcBand)

Sets MbcBand for Mbc stage for given band index

void setPostEq(DynamicsProcessing.Eq postEq)

Sets PostEq configuration stage.

void setPostEqBand(int band, DynamicsProcessing.EqBand postEqBand)

Sets EqBand for PostEq stage for given band index

void setPreEq(DynamicsProcessing.Eq preEq)

Sets PreEq configuration stage.

void setPreEqBand(int band, DynamicsProcessing.EqBand preEqBand)

Sets EqBand for PreEq stage for given band index

String toString()

Returns a string representation of the object.

Inherited methods

Public constructors

DynamicsProcessing.Channel

added in API level 28
public DynamicsProcessing.Channel (float inputGain, 
                boolean preEqInUse, 
                int preEqBandCount, 
                boolean mbcInUse, 
                int mbcBandCount, 
                boolean postEqInUse, 
                int postEqBandCount, 
                boolean limiterInUse)

Class constructor for Channel configuration.

Parameters
inputGain float: value in decibels (dB) of level change applied to the audio before processing. A value of 0 dB means no change.

preEqInUse boolean: true if PreEq stage will be used, false otherwise. This can't be changed later.

preEqBandCount int: number of bands for PreEq stage. This can't be changed later.

mbcInUse boolean: true if Mbc stage will be used, false otherwise. This can't be changed later.

mbcBandCount int: number of bands for Mbc stage. This can't be changed later.

postEqInUse boolean: true if PostEq stage will be used, false otherwise. This can't be changed later.

postEqBandCount int: number of bands for PostEq stage. This can't be changed later.

limiterInUse boolean: true if Limiter stage will be used, false otherwise. This can't be changed later.

DynamicsProcessing.Channel

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

Class constructor for Channel configuration

Parameters
cfg DynamicsProcessing.Channel: copy constructor

Public methods

getInputGain

added in API level 28
public float getInputGain ()

Gets inputGain value in decibels (dB). 0 dB means no change;

Returns
float gain value in decibels (dB)

getLimiter

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

Gets Limiter configuration stage

Returns
DynamicsProcessing.Limiter Limiter configuration stage

getMbc

added in API level 28
public DynamicsProcessing.Mbc getMbc ()

Gets Mbc configuration stage

Returns
DynamicsProcessing.Mbc Mbc configuration stage

getMbcBand

added in API level 28
public DynamicsProcessing.MbcBand getMbcBand (int band)

Gets MbcBand configuration for Mbc stage, for given band index.

Parameters
band int: index of band of interest from Mbc stage

Returns
DynamicsProcessing.MbcBand MbcBand configuration

getPostEq

added in API level 28
public DynamicsProcessing.Eq getPostEq ()

Gets PostEq configuration stage

Returns
DynamicsProcessing.Eq PostEq configuration stage

getPostEqBand

added in API level 28
public DynamicsProcessing.EqBand getPostEqBand (int band)

Gets EqBand for PostEq stage for given band index.

Parameters
band int: index of band of interest from PostEq stage

Returns
DynamicsProcessing.EqBand EqBand configuration

getPreEq

added in API level 28
public DynamicsProcessing.Eq getPreEq ()

Gets PreEq configuration stage

Returns
DynamicsProcessing.Eq PreEq configuration stage

getPreEqBand

added in API level 28
public DynamicsProcessing.EqBand getPreEqBand (int band)

Gets EqBand for PreEq stage for given band index.

Parameters
band int: index of band of interest from PreEq stage

Returns
DynamicsProcessing.EqBand EqBand configuration

setInputGain

added in API level 28
public void setInputGain (float inputGain)

Sets inputGain value in decibels (dB). 0 dB means no change;

Parameters
inputGain float: desired gain value in decibels (dB)

setLimiter

added in API level 28
public void setLimiter (DynamicsProcessing.Limiter limiter)

Sets Limiter configuration stage.

Parameters
limiter DynamicsProcessing.Limiter: configuration stage.

setMbc

added in API level 28
public void setMbc (DynamicsProcessing.Mbc mbc)

Sets Mbc configuration stage. New Mbc stage must have the same number of bands than original Mbc stage.

setMbcBand

added in API level 28
public void setMbcBand (int band, 
                DynamicsProcessing.MbcBand mbcBand)

Sets MbcBand for Mbc stage for given band index

Parameters
band int: index of band of interest from Mbc Stage

mbcBand DynamicsProcessing.MbcBand: configuration to be set

setPostEq

added in API level 28
public void setPostEq (DynamicsProcessing.Eq postEq)

Sets PostEq configuration stage. New PostEq stage must have the same number of bands than original PostEq stage.

Parameters
postEq DynamicsProcessing.Eq: configuration

setPostEqBand

added in API level 28
public void setPostEqBand (int band, 
                DynamicsProcessing.EqBand postEqBand)

Sets EqBand for PostEq stage for given band index

Parameters
band int: index of band of interest from PostEq stage

postEqBand DynamicsProcessing.EqBand: configuration to be set.

setPreEq

added in API level 28
public void setPreEq (DynamicsProcessing.Eq preEq)

Sets PreEq configuration stage. New PreEq stage must have the same number of bands than original PreEq stage.

Parameters
preEq DynamicsProcessing.Eq: configuration

setPreEqBand

added in API level 28
public void setPreEqBand (int band, 
                DynamicsProcessing.EqBand preEqBand)

Sets EqBand for PreEq stage for given band index

Parameters
band int: index of band of interest from PreEq stage

preEqBand DynamicsProcessing.EqBand: configuration to be set.

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.