SourceDataLine, and the
latter, TargetDataLine. Port objects, too, are either source
lines or target lines. A mixer can accept prerecorded, loopable sound as
input, by having some of its source lines be instances of objects that
implement the Clip interface.
Through methods of the Line interface, which Mixer extends, a
mixer might provide a set of controls that are global to the mixer. For
example, the mixer can have a master gain control. These global controls are
distinct from the controls belonging to each of the mixer's individual lines.
Some mixers, especially those with internal digital mixing capabilities, may
provide additional capabilities by implementing the DataLine
interface.
A mixer can support synchronization of its lines. When one line in a synchronized group is started or stopped, the other lines in the group automatically start or stop simultaneously with the explicitly affected one.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Mixer.
The |
| Modifier and Type | Method and Description |
|---|---|
| public Line | |
| public int | Returns: the maximum number of matching lines supported, orAudioSystem.NOT_SPECIFIEDa infoLine.Info that describes the line for which the
number of supported instances is queriedObtains the approximate maximum number of lines of the requested type that can be open simultaneously on the mixer. |
| public Mixer. | Returns: a mixer info object that describes this mixerObtains information about this mixer, including the product's name, version, vendor, etc. |
| public Line. | Returns: array ofLine.Info objects representing source lines for
this mixer. If no source lines are supported, an array of length
0 is returned.Obtains information about the set of source lines supported by this mixer. |
| public Line. | Returns: an array ofLine.Info objects describing source lines
matching the type requested. If no matching source lines are
supported, an array of length 0 is returned.a infoLine.Info object describing lines about which
information is queriedObtains information about source lines of a particular type supported by the mixer. |
| public Line[] | Returns: the source lines currently open to the mixer. If no source lines are currently open to this mixer, an array of length 0 is returned.Obtains the set of all source lines currently open to this mixer. |
| public Line. | Returns: array ofLine.Info objects representing target lines for
this mixer. If no target lines are supported, an array of length
0 is returned.Obtains information about the set of target lines supported by this mixer. |
| public Line. | Returns: an array ofLine.Info objects describing target lines
matching the type requested. If no matching target lines are
supported, an array of length 0 is returned.a infoLine.Info object describing lines about which
information is queriedObtains information about target lines of a particular type supported by the mixer. |
| public Line[] | Returns: target lines currently open from the mixer. If no target lines are currently open from this mixer, an array of length 0 is returned.Obtains the set of all target lines currently open from this mixer. |
| public boolean | Returns: true if at least one matching line is supported,
false otherwisedescribes the line for which support is queried infoIndicates whether the mixer supports a line (or lines) that match the
specified |
| public boolean | Returns: true if the lines can be synchronized, false
otherwisethe set of lines for which synchronization support is
queried lines, boolean true if the synchronization must be
precisely maintained (i.e., the synchronization must be
sample-accurate) at all times during operation of the lines, or
false if precise synchronization is required only during
start and stop operationsReports whether this mixer supports synchronization of the specified set of lines. |
| public void | synchronize(Line[]
the lines that should be synchronized lines, boolean true if the synchronization must be
precisely maintained (i.e., the synchronization must be
sample-accurate) at all times during operation of the lines, or
false if precise synchronization is required only during
start and stop operationsSynchronizes two or more lines. |
| public void | unsynchronize(Line[]
the synchronized lines for which synchronization should be
released, or lines)null for all this mixer's synchronized linesReleases synchronization for the specified lines. |
| getLine | back to summary |
|---|---|
| public Line getLine(Line. Obtains a line that is available for use and that matches the description
in the specified
If a
| |
| getMaxLines | back to summary |
|---|---|
| public int getMaxLines(Line. Obtains the approximate maximum number of lines of the requested type that can be open simultaneously on the mixer. Certain types of mixers do not have a hard bound and may allow opening more lines. Since certain lines are a shared resource, a mixer may not be able to open the maximum number of lines if another process has opened lines of this mixer.
The requested type is any line that matches the description in the
provided | |
| getMixerInfo | back to summary |
|---|---|
| public Mixer. Obtains information about this mixer, including the product's name, version, vendor, etc. | |
| getSourceLineInfo | back to summary |
|---|---|
| public Line. Obtains information about the set of source lines supported by this mixer. Some source lines may only be available when this mixer is open. | |
| getSourceLineInfo | back to summary |
|---|---|
| public Line. Obtains information about source lines of a particular type supported by the mixer. Some source lines may only be available when this mixer is open. | |
| getSourceLines | back to summary |
|---|---|
| public Line[] getSourceLines() Obtains the set of all source lines currently open to this mixer.
| |
| getTargetLineInfo | back to summary |
|---|---|
| public Line. Obtains information about the set of target lines supported by this mixer. Some target lines may only be available when this mixer is open. | |
| getTargetLineInfo | back to summary |
|---|---|
| public Line. Obtains information about target lines of a particular type supported by the mixer. Some target lines may only be available when this mixer is open. | |
| getTargetLines | back to summary |
|---|---|
| public Line[] getTargetLines() Obtains the set of all target lines currently open from this mixer.
| |
| isLineSupported | back to summary |
|---|---|
| public boolean isLineSupported(Line. Indicates whether the mixer supports a line (or lines) that match the
specified | |
| isSynchronizationSupported | back to summary |
|---|---|
| public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync) Reports whether this mixer supports synchronization of the specified set of lines.
| |
| synchronize | back to summary |
|---|---|
| public void synchronize(Line[] lines, boolean maintainSync) Synchronizes two or more lines. Any subsequent command that starts or stops audio playback or capture for one of these lines will exert the same effect on the other lines in the group, so that they start or stop playing or capturing data simultaneously.
| |
| unsynchronize | back to summary |
|---|---|
| public void unsynchronize(Line[] lines) Releases synchronization for the specified lines. The array must be
identical to one for which synchronization has already been established;
otherwise an exception may be thrown. However,
| |
Mixer.Info class represents information about an audio mixer,
including the product's name, version, and vendor, along with a textual
description. This information may be retrieved through the
getMixerInfo method of the Mixer
interface.
| Modifier and Type | Field and Description |
|---|---|
| private final String | description
Mixer description. |
| private final String | name
Mixer name. |
| private final String | vendor
Mixer vendor. |
| private final String | version
Mixer version. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: true if the specified object is equal to this info
object; false otherwisethe reference object with which to compare obj)Overrides java. Indicates whether the specified object is equal to this info object,
returning |
| public final String | |
| public final String | |
| public final String | |
| public final String | |
| public final int | Returns: a hash code value for this info objectOverrides java. Returns a hash code value for this info object. |
| public final String | Returns: a string representation of the info objectOverrides java. Returns a string representation of the info object. |
| description | back to summary |
|---|---|
| private final String description Mixer description. | |
| name | back to summary |
|---|---|
| private final String name Mixer name. | |
| vendor | back to summary |
|---|---|
| private final String vendor Mixer vendor. | |
| version | back to summary |
|---|---|
| private final String version Mixer version. | |
| Info | back to summary |
|---|---|
| protected Info(String name, String vendor, String description, String version) Constructs a mixer's info object, passing it the given textual information. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Indicates whether the specified object is equal to this info object,
returning | |
| getDescription | back to summary |
|---|---|
| public final String getDescription() Obtains the description of the mixer.
| |
| getName | back to summary |
|---|---|
| public final String getName() Obtains the name of the mixer.
| |
| getVendor | back to summary |
|---|---|
| public final String getVendor() Obtains the vendor of the mixer.
| |
| getVersion | back to summary |
|---|---|
| public final String getVersion() Obtains the version of the mixer.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Returns a hash code value for this info object.
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Returns a string representation of the info object. | |