|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.sound.sampled
|
Nested Class Summary | |
static class |
Mixer.Info
The Mixer.Info class represents information about an audio mixer,
including the product's name, version, and vendor, along with a textual
description. |
Method Summary | |
Line |
getLine(Line.Info info)
Obtains a line that is available for use and that matches the description in the specified Line.Info object. |
int |
getMaxLines(Line.Info info)
Obtains the maximum number of lines of the requested type that can be open simultaneously on the mixer. |
Mixer.Info |
getMixerInfo()
Obtains information about this mixer, including the product's name, version, vendor, etc. |
Line.Info[] |
getSourceLineInfo()
Obtains information about the set of source lines supported by this mixer. |
Line.Info[] |
getSourceLineInfo(Line.Info info)
Obtains information about source lines of a particular type supported by the mixer. |
Line[] |
getSourceLines()
Obtains the set of all source lines currently open to this mixer. |
Line.Info[] |
getTargetLineInfo()
Obtains information about the set of target lines supported by this mixer. |
Line.Info[] |
getTargetLineInfo(Line.Info info)
Obtains information about target lines of a particular type supported by the mixer. |
Line[] |
getTargetLines()
Obtains the set of all target lines currently open from this mixer. |
boolean |
isLineSupported(Line.Info info)
Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object. |
boolean |
isSynchronizationSupported(Line[] lines,
boolean maintainSync)
Reports whether this mixer supports synchronization of the specified set of lines. |
void |
synchronize(Line[] lines,
boolean maintainSync)
Synchronizes two or more lines. |
void |
unsynchronize(Line[] lines)
Releases synchronization for the specified lines. |
Methods inherited from interface javax.sound.sampled.Line |
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener |
Method Detail |
public Mixer.Info getMixerInfo()
Mixer.Info
public Line.Info[] getSourceLineInfo()
Line.Info
objects representing source lines
for this mixer. If no source lines are supported,
an array of length 0 is returned.public Line.Info[] getTargetLineInfo()
Line.Info
objects representing target lines
for this mixer. If no target lines are supported,
an array of length 0 is returned.public Line.Info[] getSourceLineInfo(Line.Info info)
info
- a Line.Info
object describing lines about which information
is queried
Line.Info
objects describing source lines matching
the type requested. If no matching source lines are supported, an array of length 0
is returned.public Line.Info[] getTargetLineInfo(Line.Info info)
info
- a Line.Info
object describing lines about which information
is queried
Line.Info
objects describing target lines matching
the type requested. If no matching target lines are supported, an array of length 0
is returned.public boolean isLineSupported(Line.Info info)
Line.Info
object.
Some lines may only be supported when this mixer is open.
info
- describes the line for which support is queried
true
if at least one matching line is
supported, false
otherwisepublic Line getLine(Line.Info info) throws LineUnavailableException
Line.Info
object.
info
- describes the desired line
LineUnavailableException
- if a matching line
is not available due to resource restrictions
IllegalArgumentException
- if this mixer does
not support any lines matching the description
SecurityException
- if a matching line
is not available due to security restrictionspublic int getMaxLines(Line.Info info)
Line.Info
object. For example, if the info object represents a speaker
port, and the mixer supports exactly one speaker port, this method
should return 1. If the info object represents a source data line
and the mixer supports the use of 32 source data lines simultaneously,
the return value should be 32.
If there is no limit, this function returns AudioSystem.NOT_SPECIFIED
.
info
- a Line.Info
that describes the line for which
the number of supported instances is queried
AudioSystem.NOT_SPECIFIED
public Line[] getSourceLines()
SecurityException
- if the matching lines
are not available due to security restrictionspublic Line[] getTargetLines()
SecurityException
- if the matching lines
are not available due to security restrictionspublic void synchronize(Line[] lines, boolean maintainSync)
lines
- the lines that should be synchronizedmaintainSync
- 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 operations
IllegalArgumentException
- if the lines cannot be synchronized.
This may occur if the lines are of different types or have different
formats for which this mixer does not support synchronization, or if
all lines specified do not belong to this mixer.public void unsynchronize(Line[] lines)
null
may be specified, in which case all currently synchronized lines that belong
to this mixer are unsynchronized.
lines
- the synchronized lines for which synchronization should be
released, or null
for all this mixer's synchronized lines
IllegalArgumentException
- if the lines cannot be unsynchronized.
This may occur if the argument specified does not exactly match a set
of lines for which synchronization has already been established.public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync)
lines
- the set of lines for which synchronization support is queriedmaintainSync
- 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 operations
true
if the lines can be synchronized, false
otherwise