< prev index next >

src/java.desktop/share/classes/javax/sound/sampled/DataLine.java

Print this page

        

*** 52,62 **** * when data playback or capture actually begins. Or, if the flow of data to an * active data line is constricted so that a gap occurs in the presentation of * data, a {@code STOP} event is generated. * <p> * Mixers often support synchronized control of multiple data lines. ! * Synchronization can be established through the Mixer interface's * {@link Mixer#synchronize synchronize} method. See the description of the * {@link Mixer Mixer} interface for a more complete description. * * @author Kara Kytle * @see LineEvent --- 52,62 ---- * when data playback or capture actually begins. Or, if the flow of data to an * active data line is constricted so that a gap occurs in the presentation of * data, a {@code STOP} event is generated. * <p> * Mixers often support synchronized control of multiple data lines. ! * Synchronization can be established through the {@code Mixer} interface's * {@link Mixer#synchronize synchronize} method. See the description of the * {@link Mixer Mixer} interface for a more complete description. * * @author Kara Kytle * @see LineEvent
*** 179,189 **** * buffer to which data can be written. For a target data line, it is the * size of the buffer from which data can be read. Note that the units used * are bytes, but will always correspond to an integral number of sample * frames of audio data. * ! * @return the size of the buffer in bytes */ int getBufferSize(); /** * Obtains the number of bytes of data currently available to the --- 179,189 ---- * buffer to which data can be written. For a target data line, it is the * size of the buffer from which data can be read. Note that the units used * are bytes, but will always correspond to an integral number of sample * frames of audio data. * ! * @return the size of the buffer, in bytes */ int getBufferSize(); /** * Obtains the number of bytes of data currently available to the
*** 258,285 **** /** * Besides the class information inherited from its superclass, * {@code DataLine.Info} provides additional information specific to data * lines. This information includes: * <ul> ! * <li> the audio formats supported by the data line ! * <li> the minimum and maximum sizes of its internal buffer * </ul> * Because a {@code Line.Info} knows the class of the line its describes, a * {@code DataLine.Info} object can describe {@code DataLine} subinterfaces * such as {@link SourceDataLine}, {@link TargetDataLine}, and {@link Clip}. * You can query a mixer for lines of any of these types, passing an * appropriate instance of {@code DataLine.Info} as the argument to a method * such as {@link Mixer#getLine(Line.Info)}. * - * @see Line.Info * @author Kara Kytle * @since 1.3 */ class Info extends Line.Info { private final AudioFormat[] formats; private final int minBufferSize; private final 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 --- 258,296 ---- /** * Besides the class information inherited from its superclass, * {@code DataLine.Info} provides additional information specific to data * lines. This information includes: * <ul> ! * <li>the audio formats supported by the data line ! * <li>the minimum and maximum sizes of its internal buffer * </ul> * Because a {@code Line.Info} knows the class of the line its describes, a * {@code DataLine.Info} object can describe {@code DataLine} subinterfaces * such as {@link SourceDataLine}, {@link TargetDataLine}, and {@link Clip}. * You can query a mixer for lines of any of these types, passing an * appropriate instance of {@code DataLine.Info} as the argument to a method * such as {@link Mixer#getLine(Line.Info)}. * * @author Kara Kytle + * @see Line.Info * @since 1.3 */ class Info extends Line.Info { + /** + * The set of supported formats. + */ private final AudioFormat[] formats; + + /** + * Minimum buffer size supported by the data line, in bytes. + */ private final int minBufferSize; + + /** + * Maximum buffer size supported by the data line, in bytes. + */ private final 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
*** 287,300 **** * implementations when returning information about a supported line. * * @param lineClass the class of the data line described by the info * object * @param formats set of formats supported ! * @param minBufferSize minimum buffer size supported by the data ! * line, in bytes ! * @param maxBufferSize maximum buffer size supported by the data ! * line, in bytes */ public Info(Class<?> lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize) { super(lineClass); --- 298,311 ---- * implementations when returning information about a supported line. * * @param lineClass the class of the data line described by the info * object * @param formats set of formats supported ! * @param minBufferSize minimum buffer size supported by the data line, ! * in bytes ! * @param maxBufferSize maximum buffer size supported by the data line, ! * in bytes */ public Info(Class<?> lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize) { super(lineClass);
*** 315,325 **** * line. * * @param lineClass the class of the data line described by the info * object * @param format desired format ! * @param bufferSize desired buffer size in bytes */ public Info(Class<?> lineClass, AudioFormat format, int bufferSize) { super(lineClass); --- 326,336 ---- * line. * * @param lineClass the class of the data line described by the info * object * @param format desired format ! * @param bufferSize desired buffer size, in bytes */ public Info(Class<?> lineClass, AudioFormat format, int bufferSize) { super(lineClass);
*** 352,362 **** * certain additional formats that are missing from the set returned by * {@code getFormats()}. The reverse is not the case: * {@code isFormatSupported(AudioFormat)} is guaranteed to return * {@code true} for all formats returned by {@code getFormats()}. * <p> ! * Some fields in the AudioFormat instances can be set to * {@link AudioSystem#NOT_SPECIFIED NOT_SPECIFIED} if that field does * not apply to the format, or if the format supports a wide range of * values for that field. For example, a multi-channel device supporting * up to 64 channels, could set the channel field in the * {@code AudioFormat} instances returned by this method to --- 363,373 ---- * certain additional formats that are missing from the set returned by * {@code getFormats()}. The reverse is not the case: * {@code isFormatSupported(AudioFormat)} is guaranteed to return * {@code true} for all formats returned by {@code getFormats()}. * <p> ! * Some fields in the {@code AudioFormat} instances can be set to * {@link AudioSystem#NOT_SPECIFIED NOT_SPECIFIED} if that field does * not apply to the format, or if the format supports a wide range of * values for that field. For example, a multi-channel device supporting * up to 64 channels, could set the channel field in the * {@code AudioFormat} instances returned by this method to
*** 417,426 **** --- 428,438 ---- * this object's minimum buffer size must be at least as large as that * of the object specified, its maximum buffer size must be at most as * large as that of the object specified, and all of its formats must * match formats supported by the object specified. * + * @param info the info object which is being compared to this one * @return {@code true} if this object matches the one specified, * otherwise {@code false} */ @Override public boolean matches(Line.Info info) {
< prev index next >