public static class FloatControl.Type extends Control.Type
FloatControl.Type
inner class identifies one kind of
float control. Static instances are provided for the
common types.Modifier and Type | Field and Description |
---|---|
static FloatControl.Type |
AUX_RETURN
Represents a control for the auxiliary return gain on a line.
|
static FloatControl.Type |
AUX_SEND
Represents a control for the auxiliary send gain on a line.
|
static FloatControl.Type |
BALANCE
Represents a control for the relative balance of a stereo signal
between two stereo speakers.
|
static FloatControl.Type |
MASTER_GAIN
Represents a control for the overall gain on a line.
|
static FloatControl.Type |
PAN
Represents a control for the relative pan (left-right positioning)
of the signal.
|
static FloatControl.Type |
REVERB_RETURN
Represents a control for the post-reverb gain on a line.
|
static FloatControl.Type |
REVERB_SEND
Represents a control for the pre-reverb gain on a line.
|
static FloatControl.Type |
SAMPLE_RATE
Represents a control that changes the sample rate of audio playback.
|
static FloatControl.Type |
VOLUME
Represents a control for the volume on a line.
|
Modifier | Constructor and Description |
---|---|
protected |
FloatControl.Type(String name)
Constructs a new float control type.
|
public static final FloatControl.Type MASTER_GAIN
Gain is a quantity in decibels (dB) that is added to the intrinsic decibel level of the audio signal--that is, the level of the signal before it is altered by the gain control. A positive gain amplifies (boosts) the signal's volume, and a negative gain attenuates (cuts) it. The gain setting defaults to a value of 0.0 dB, meaning the signal's loudness is unaffected. Note that gain measures dB, not amplitude. The relationship between a gain in decibels and the corresponding linear amplitude multiplier is:
linearScalar = pow(10.0, gainDB/20.0)
The FloatControl
class has methods to impose a maximum and
minimum allowable value for gain. However, because an audio signal might
already be at a high amplitude, the maximum setting does not guarantee
that the signal will be undistorted when the gain is applied to it (unless
the maximum is zero or negative). To avoid numeric overflow from excessively
large gain settings, a gain control can implement
clipping, meaning that the signal's amplitude will be limited to the maximum
value representable by its audio format, instead of wrapping around.
These comments apply to gain controls in general, not just master gain controls. A line can have more than one gain control. For example, a mixer (which is itself a line) might have a master gain control, an auxiliary return control, a reverb return control, and, on each of its source lines, an individual aux send and reverb send.
AUX_SEND
,
AUX_RETURN
,
REVERB_SEND
,
REVERB_RETURN
,
VOLUME
public static final FloatControl.Type AUX_SEND
MASTER_GAIN
,
AUX_RETURN
public static final FloatControl.Type AUX_RETURN
MASTER_GAIN
,
AUX_SEND
public static final FloatControl.Type REVERB_SEND
MASTER_GAIN
,
REVERB_RETURN
,
EnumControl.Type.REVERB
public static final FloatControl.Type REVERB_RETURN
MASTER_GAIN
,
REVERB_SEND
public static final FloatControl.Type VOLUME
public static final FloatControl.Type PAN
BALANCE
public static final FloatControl.Type BALANCE
PAN
public static final FloatControl.Type SAMPLE_RATE
AudioFormat
object. For example, if the natural rate
of the media is 11025 samples per second and the sample rate is set
to 22050 samples per second, the media will play back at twice the
normal speed.
Changing the sample rate with this control does not affect the data line's audio format. Also note that whenever you change a sound's sample rate, a change in the sound's pitch results. For example, doubling the sample rate has the effect of doubling the frequencies in the sound's spectrum, which raises the pitch by an octave.
protected FloatControl.Type(String name)
name
- the name of the new float control type Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.