public interface SourceDataLine extends DataLine
DataLine.Info
Modifier and Type | Method and Description |
---|---|
void |
open(AudioFormat fmt)
Open the line, given the desired audio format.
|
void |
open(AudioFormat fmt,
int size)
Open the line, given the desired audio format and the buffer size.
|
int |
write(byte[] buf,
int offset,
int length)
Write audio data to this line.
|
available, drain, flush, getBufferSize, getFormat, getFramePosition, getLevel, getLongFramePosition, getMicrosecondPosition, isActive, isRunning, start, stop
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener
void open(AudioFormat fmt) throws LineUnavailableException
fmt
- the format to useLineUnavailableException
- if the line is not available for
some reasonSecurityException
- if this is prevented by the security managervoid open(AudioFormat fmt, int size) throws LineUnavailableException
fmt
- the format to usesize
- the buffer sizeLineUnavailableException
- if the line is not available for
some reasonSecurityException
- if this is prevented by the security managerint write(byte[] buf, int offset, int length)
buf
- a byte array of audio dataoffset
- index of the first byte in the array to uselength
- the number of bytes to write