Example usage for Java javax.sound.sampled Clip fields, constructors, methods, implement or subclass
The text is from its open source code.
int | LOOP_CONTINUOUSLY A value indicating that looping should continue indefinitely rather than complete after a specific number of loops. |
void | addLineListener(LineListener listener) Adds a listener to this line. |
void | close() Closes the line, indicating that any system resources in use by the line can be released. |
void | drain() Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied. |
void | flush() Flushes queued data from the line. |
int | getBufferSize() Obtains the maximum number of bytes of data that will fit in the data line's internal buffer. |
Control | getControl(Control.Type control) Obtains a control of the specified type, if there is any. |
AudioFormat | getFormat() Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data. |
long | getMicrosecondPosition() Obtains the current position in the audio data, in microseconds. |
boolean | isActive() Indicates whether the line is engaging in active I/O (such as playback or capture). |
boolean | isRunning() Indicates whether the line is running. |
void | loop(int count) Starts looping playback from the current position. |
void | open(AudioInputStream stream) Opens the clip with the format and audio data present in the provided audio input stream. |
void | open(AudioFormat format, byte[] data, int offset, int bufferSize) Opens the clip, meaning that it should acquire any required system resources and become operational. |
void | setFramePosition(int frames) Sets the media position in sample frames. |
void | start() Allows a line to engage in data I/O. |
void | stop() Stops the line. |