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

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

Introduction

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

The text is from its open source code.

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.
intgetBufferSize()
Obtains the maximum number of bytes of data that will fit in the data line's internal buffer.
AudioFormatgetFormat()
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
booleanisOpen()
Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be playing or capturing sound.
booleanisRunning()
Indicates whether the line is running.
voidopen(AudioFormat format)
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
voidopen(AudioFormat format, int bufferSize)
Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
voidstart()
Allows a line to engage in data I/O.
voidstop()
Stops the line.
intwrite(byte[] b, int off, int len)
Writes audio data to the mixer via this source data line.