|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
public interface GainControl
GainControl is an interface for manipulating audio signal
gain.
float
values. A gain of 0.0 dB implies that the audio signal
is neither amplified nor attenuated. Positive values
amplify the audio signal, negative values attenuate
the audio signal. The relationship between a linear
gain multiplier and the gain specified in decibels is:
value = pow(10.0, gainDB/20.0) setLevel
will affect subsequent getDB invocations.
Level and dB are interrelated in the following ways:
setLevel(0.0), getDB
returns the value for which smaller values are not usefully
distinguishable from silence.
Calling setDB with values equal to or less than this silence
threshold causes getLevel to return a value of 0.0.
setLevel(1.0), getDB
returns the value for which larger values are not useful.
Calling setDB with values equal to or greater than this
threshold causes getLevel to return a value of 1.0.
setDB with a value that is greater than the
maximum level threshold and then immediately call
getDB, getDB returns the gain
that was returned by the setDB, not the value that
would be returned if you called setLevel(1.0) and then
called getDB.
true,
no audio signal is produced by this object; if mute is false
an audio signal is produced and the gain is applied to the
signal.
GainControl changes, a
GainChangeEvent is posted.
This event is delivered through an object
that implements GainChangeListener and has been registered as a listener
with the GainControl using addGainChangeListener.
GainChangeEvent,
GainChangeListener,
Control| 方法摘要 | |
|---|---|
void |
addGainChangeListener(GainChangeListener listener)
Register for gain change update events. |
float |
getDB()
Get the current gain set for this object in dB. |
float |
getLevel()
Get the current gain set for this object as a value between 0.0 and 1.0 |
boolean |
getMute()
Get the mute state of the signal associated with this GainControl. |
void |
removeGainChangeListener(GainChangeListener listener)
Remove interest in gain change update events. |
float |
setDB(float gain)
Set the gain in decibels. |
float |
setLevel(float level)
Set the gain using a floating point scale with values between 0.0 and 1.0. 0.0 is silence; 1.0 is the loudest useful level that this GainControl supports. |
void |
setMute(boolean mute)
Mute or unmute the signal associated with this GainControl. |
| 从接口 javax.media.Control 继承的方法 |
|---|
getControlComponent |
| 方法详细信息 |
|---|
void setMute(boolean mute)
GainControl.
Calling setMute(true) on
an object that is already muted is ignored, as is calling
setMute(false) on an object that is not currently muted.
Going from a muted to an unmuted state doesn't effect the
gain.
mute - Specify true to mute the signal, false to unmute the signal.boolean getMute()
GainControl.
float setDB(float gain)
gain - The new gain in dB.
float getDB()
float setLevel(float level)
GainControl supports.
level - The new gain value specified in the level scale.
float getLevel()
void addGainChangeListener(GainChangeListener listener)
GainChangeEvent is posted when the state
of the GainControl changes.
listener - The object to deliver events to.void removeGainChangeListener(GainChangeListener listener)
listener - The object that has been receiving events.
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||