java.lang.Object | |
↳ | com.h6ah4i.android.media.opensl.audiofx.OpenSLPreAmp |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.h6ah4i.android.media.audiofx.IAudioEffect
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OpenSLPreAmp(OpenSLMediaPlayerContext context) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
getEnabled()
Returns effect enabled state
| ||||||||||
int |
getId()
Returns effect unique identifier.
| ||||||||||
float |
getLevel()
Gets current amplitude level value.
| ||||||||||
IPreAmp.Settings |
getProperties()
Gets the preamp properties.
| ||||||||||
boolean |
hasControl()
Checks if this AudioEffect object is controlling the effect engine.
| ||||||||||
void |
release()
Releases the native AudioEffect resources.
| ||||||||||
void |
setControlStatusListener(IAudioEffect.OnControlStatusChangeListener listener)
Sets the listener AudioEffect notifies when the effect engine control is
taken or returned.
| ||||||||||
void |
setEnableStatusListener(IAudioEffect.OnEnableStatusChangeListener listener)
Sets the listener AudioEffect notifies when the effect engine is enabled
or disabled.
| ||||||||||
int |
setEnabled(boolean enabled)
Enable or disable the effect.
| ||||||||||
void |
setLevel(float level)
Sets amplitude level value.
| ||||||||||
void |
setProperties(IPreAmp.Settings settings)
Sets the preamp properties.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | finalize() | ||||||||||
static void | parseResultAndThrowExceptForIOExceptions(int result) | ||||||||||
static void | parseResultAndThrowException(int result) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.h6ah4i.android.media.IReleasable
| |||||||||||
From interface
com.h6ah4i.android.media.audiofx.IAudioEffect
| |||||||||||
From interface
com.h6ah4i.android.media.audiofx.IPreAmp
|
IllegalArgumentException | |
---|---|
IllegalStateException | |
RuntimeException | |
UnsupportedOperationException |
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 |
---|
Gets current amplitude level value.
IllegalArgumentException | |
---|---|
IllegalStateException | |
UnsupportedOperationException |
Gets the preamp properties. This method is useful when a snapshot of current preamp settings must be saved by the application.
IllegalArgumentException | |
---|---|
IllegalStateException | |
UnsupportedOperationException |
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.
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 |
---|
Sets amplitude level value.
level | new gain in linear. |
---|
IllegalArgumentException | |
---|---|
IllegalStateException | |
UnsupportedOperationException |
Sets the preamp properties. This method is useful when preamp settings have to be applied from a previous backup.
settings | a IPreAmp.Settings object containing the properties to apply |
---|
IllegalArgumentException | |
---|---|
IllegalStateException | |
UnsupportedOperationException |
Throwable |
---|
IOException |
---|