com.h6ah4i.android.media.audiofx.IAudioEffect |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | IAudioEffect.OnControlStatusChangeListener | The OnControlStatusChangeListener interface defines a method called by the AudioEffect when a the control of the effect engine is gained or lost by the application | |||||||||
interface | IAudioEffect.OnEnableStatusChangeListener | The OnEnableStatusChangeListener interface defines a method called by the AudioEffect when a the enabled state of the effect engine was changed by the controlling application. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ALREADY_EXISTS | Internal operation status. | |||||||||
int | ERROR | Unspecified error. | |||||||||
int | ERROR_BAD_VALUE | Operation failed due to bad parameter value. | |||||||||
int | ERROR_DEAD_OBJECT | Operation failed due to dead remote object. | |||||||||
int | ERROR_INVALID_OPERATION | Operation failed because it was requested in wrong state. | |||||||||
int | ERROR_NO_INIT | Operation failed due to bad object initialization. | |||||||||
int | ERROR_NO_MEMORY | Operation failed due to lack of memory. | |||||||||
int | SUCCESS | Successful operation. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
getEnabled()
Returns effect enabled state
| ||||||||||
abstract int |
getId()
Returns effect unique identifier.
| ||||||||||
abstract boolean |
hasControl()
Checks if this AudioEffect object is controlling the effect engine.
| ||||||||||
abstract void |
release()
Releases the native AudioEffect resources.
| ||||||||||
abstract void |
setControlStatusListener(IAudioEffect.OnControlStatusChangeListener listener)
Sets the listener AudioEffect notifies when the effect engine control is
taken or returned.
| ||||||||||
abstract void |
setEnableStatusListener(IAudioEffect.OnEnableStatusChangeListener listener)
Sets the listener AudioEffect notifies when the effect engine is enabled
or disabled.
| ||||||||||
abstract int |
setEnabled(boolean enabled)
Enable or disable the effect.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.h6ah4i.android.media.IReleasable
|
Internal operation status. Not returned by any method.
Unspecified error.
Operation failed due to bad parameter value.
Operation failed due to dead remote object.
Operation failed because it was requested in wrong state.
Operation failed due to bad object initialization.
Operation failed due to lack of memory.
Successful operation.
Returns effect enabled state
IllegalStateException |
---|
Returns effect unique identifier. This system wide unique identifier can be used to attach this effect to a MediaPlayer or an AudioTrack when the effect is an auxiliary effect (Reverb)
IllegalStateException |
---|
Checks if this AudioEffect object is controlling the effect engine.
IllegalStateException |
---|
Releases the native AudioEffect resources. It is a good practice to release the effect engine when not in use as control can be returned to other applications or the native resources released.
IllegalStateException |
---|
Sets the listener AudioEffect notifies when the effect engine control is taken or returned.
IllegalStateException |
---|
Sets the listener AudioEffect notifies when the effect engine is enabled or disabled.
IllegalStateException |
---|
Enable or disable the effect. Creating an audio effect does not automatically apply this effect on the audio source. It creates the resources necessary to process this effect but the audio signal is still bypassed through the effect engine. Calling this method will make that the effect is actually applied or not to the audio content being played in the corresponding audio session.
enabled | the requested enable state |
---|
SUCCESS
in case of success,
ERROR_INVALID_OPERATION
or ERROR_DEAD_OBJECT
in
case of failure.IllegalStateException |
---|