Class Overview
LoudnessEnhancer is an audio effect for increasing audio loudness.
The processing is parametrized by a target gain value, which determines the maximum amount
by which an audio signal will be amplified; signals amplified outside of the sample
range supported by the platform are compressed.
An application creates a LoudnessEnhancer object to instantiate and control a
this audio effect in the audio framework.
To attach the LoudnessEnhancer to a particular AudioTrack or MediaPlayer,
specify the audio session ID of this AudioTrack or MediaPlayer when constructing the effect
(see getAudioSessionId()
and getAudioSessionId()
).
Summary
Public Methods |
float
|
getTargetGain()
Return the target gain.
|
void
|
setTargetGain(int gainmB)
Set the target gain for the audio effect.
|
[Expand]
Inherited Methods |
From class
android.media.audiofx.AudioEffect
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Constants
public
static
final
int
PARAM_TARGET_GAIN_MB
The maximum gain applied applied to the signal to process.
It is expressed in millibels (100mB = 1dB) where 0mB corresponds to no amplification.
Constant Value:
0
(0x00000000)
Public Constructors
public
LoudnessEnhancer
(int audioSession)
Parameters
audioSession
| system-wide unique audio session identifier. The LoudnessEnhancer
will be attached to the MediaPlayer or AudioTrack in the same audio session. |
Public Methods
public
float
getTargetGain
()
Returns
- the effect target gain expressed in mB.
public
void
setTargetGain
(int gainmB)
Set the target gain for the audio effect.
The target gain is the maximum value by which a sample value will be amplified when the
effect is enabled.
Parameters
gainmB
| the effect target gain expressed in mB. 0mB corresponds to no amplification. |