Java javax.sound.sampled Clip fields, constructors, methods, implement or subclass

Example usage for Java javax.sound.sampled Clip fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.sound.sampled Clip.

The text is from its open source code.

Field

intLOOP_CONTINUOUSLY
A value indicating that looping should continue indefinitely rather than complete after a specific number of loops.

Method

voidaddLineListener(LineListener listener)
Adds a listener to this line.
voidclose()
Closes the line, indicating that any system resources in use by the line can be released.
voiddrain()
Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied.
voidflush()
Flushes queued data from the line.
intgetBufferSize()
Obtains the maximum number of bytes of data that will fit in the data line's internal buffer.
ControlgetControl(Control.Type control)
Obtains a control of the specified type, if there is any.
AudioFormatgetFormat()
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
longgetMicrosecondPosition()
Obtains the current position in the audio data, in microseconds.
booleanisActive()
Indicates whether the line is engaging in active I/O (such as playback or capture).
booleanisRunning()
Indicates whether the line is running.
voidloop(int count)
Starts looping playback from the current position.
voidopen(AudioInputStream stream)
Opens the clip with the format and audio data present in the provided audio input stream.
voidopen(AudioFormat format, byte[] data, int offset, int bufferSize)
Opens the clip, meaning that it should acquire any required system resources and become operational.
voidsetFramePosition(int frames)
Sets the media position in sample frames.
voidstart()
Allows a line to engage in data I/O.
voidstop()
Stops the line.