|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.sound.sampled.Line.Info | +--javax.sound.sampled.DataLine.Info
Besides the class information inherited from its superclass,
DataLine.Info
provides additional information specific to data lines.
This information includes:
Line.Info
knows the class of the line its describes, a
DataLine.Info
object can describe DataLine
subinterfaces such as SourceDataLine
,
TargetDataLine
, and Clip
.
You can query a mixer for lines of any of these types, passing an appropriate
instance of DataLine.Info
as the argument to a method such as
Mixer.getLine(Line.Info)
.
Line.Info
Constructor Summary | |
DataLine.Info(Class lineClass,
AudioFormat format)
Constructs a data line's info object from the specified information, which includes a single audio format. |
|
DataLine.Info(Class lineClass,
AudioFormat[] formats,
int minBufferSize,
int maxBufferSize)
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size. |
|
DataLine.Info(Class lineClass,
AudioFormat format,
int bufferSize)
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size. |
Method Summary | |
AudioFormat[] |
getFormats()
Obtains a set of audio formats supported by the data line. |
int |
getMaxBufferSize()
Obtains the maximum buffer size supported by the data line. |
int |
getMinBufferSize()
Obtains the minimum buffer size supported by the data line. |
boolean |
isFormatSupported(AudioFormat format)
Indicates whether this data line supports a particular audio format. |
boolean |
matches(Line.Info info)
Determines whether the specified info object matches this one. |
String |
toString()
Obtains a textual description of the data line info. |
Methods inherited from class javax.sound.sampled.Line.Info |
getLineClass |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataLine.Info(Class lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize)
lineClass
- the class of the data line described by the info objectformats
- set of formats supportedminBufferSize
- minimum buffer size supported by the data line, in bytesmaxBufferSize
- maximum buffer size supported by the data line, in bytespublic DataLine.Info(Class lineClass, AudioFormat format, int bufferSize)
lineClass
- the class of the data line described by the info objectformat
- desired formatbufferSize
- desired buffer size in bytespublic DataLine.Info(Class lineClass, AudioFormat format)
lineClass
- the class of the data line described by the info objectformat
- desired formatMethod Detail |
public AudioFormat[] getFormats()
isFormatSupported(AudioFormat)
might return
true
for certain additional formats that are missing from
the set returned by getFormats()
. The reverse is not
the case: isFormatSupported(AudioFormat)
is guaranteed to return
true
for all formats returned by getFormats()
.isFormatSupported(AudioFormat)
public boolean isFormatSupported(AudioFormat format)
true
if
the specified format matches any of the supported formats.format
- the audio format for which support is queried.true
if the format is supported, otherwise false
getFormats()
,
AudioFormat.matches(javax.sound.sampled.AudioFormat)
public int getMinBufferSize()
AudioSystem.NOT_SPECIFIED
public int getMaxBufferSize()
AudioSystem.NOT_SPECIFIED
public boolean matches(Line.Info info)
matches
in class Line.Info
true
if this object matches the one specified,
otherwise false
.public String toString()
toString
in class Line.Info
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.