public interface

IBassBoost

implements IAudioEffect
com.h6ah4i.android.media.audiofx.IBassBoost
Known Indirect Subclasses

Summary

Nested Classes
interface IBassBoost.OnParameterChangeListener The OnParameterChangeListener interface defines a method called by the BassBoost when a parameter value has changed. 
class IBassBoost.Settings The Settings class regroups all bass boost parameters. 
Constants
int PARAM_STRENGTH Is strength parameter supported by bass boost engine.
int PARAM_STRENGTH_SUPPORTED Bass boost effect strength.
[Expand]
Inherited Constants
From interface com.h6ah4i.android.media.audiofx.IAudioEffect
Public Methods
abstract IBassBoost.Settings getProperties()
Gets the bass boost properties.
abstract short getRoundedStrength()
Gets the current strength of the effect.
abstract boolean getStrengthSupported()
Indicates whether setting strength is supported.
abstract void setParameterListener(IBassBoost.OnParameterChangeListener listener)
Registers an OnParameterChangeListener interface.
abstract void setProperties(IBassBoost.Settings settings)
Sets the bass boost properties.
abstract void setStrength(short strength)
Sets the strength of the bass boost effect.
[Expand]
Inherited Methods
From interface com.h6ah4i.android.media.IReleasable
From interface com.h6ah4i.android.media.audiofx.IAudioEffect

Constants

public static final int PARAM_STRENGTH

Is strength parameter supported by bass boost engine. Parameter ID for getParameter().

Constant Value: 1 (0x00000001)

public static final int PARAM_STRENGTH_SUPPORTED

Bass boost effect strength. Parameter ID for IBassBoost.OnParameterChangeListener

Constant Value: 0 (0x00000000)

Public Methods

public abstract IBassBoost.Settings getProperties ()

Gets the bass boost properties. This method is useful when a snapshot of current bass boost settings must be saved by the application.

Returns
  • a IBassBoost.Settings object containing all current parameters values
Throws
IllegalStateException
IllegalArgumentException
UnsupportedOperationException
IllegalArgumentException
IllegalStateException

public abstract short getRoundedStrength ()

Gets the current strength of the effect.

Returns
  • the strength of the effect. The valid range for strength is [0, 1000], where 0 per mille designates the mildest effect and 1000 per mille the strongest
Throws
IllegalStateException
IllegalArgumentException
UnsupportedOperationException
IllegalArgumentException
IllegalStateException

public abstract boolean getStrengthSupported ()

Indicates whether setting strength is supported. If this method returns false, only one strength is supported and the setStrength() method always rounds to that value.

Returns
  • true is strength parameter is supported, false otherwise

public abstract void setParameterListener (IBassBoost.OnParameterChangeListener listener)

Registers an OnParameterChangeListener interface.

Parameters
listener OnParameterChangeListener interface registered

public abstract void setProperties (IBassBoost.Settings settings)

Sets the bass boost properties. This method is useful when bass boost settings have to be applied from a previous backup.

Parameters
settings a IBassBoost.Settings object containing the properties to apply
Throws
IllegalStateException
IllegalArgumentException
UnsupportedOperationException
IllegalArgumentException
IllegalStateException

public abstract void setStrength (short strength)

Sets the strength of the bass boost effect. If the implementation does not support per mille accuracy for setting the strength, it is allowed to round the given strength to the nearest supported value. You can use the getRoundedStrength() method to query the (possibly rounded) value that was actually set.

Parameters
strength strength of the effect. The valid range for strength strength is [0, 1000], where 0 per mille designates the mildest effect and 1000 per mille designates the strongest.
Throws
IllegalStateException
IllegalArgumentException
UnsupportedOperationException
IllegalArgumentException
IllegalStateException