| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private float | |
| private float | |
| private float | |
| private float | |
| private boolean | |
| private AudioFloatInputStream | |
| private int | |
| private int | |
| private byte[] | |
| private long | |
| private int | |
| private int | |
| private AudioFormat | |
| private int | |
| private int | |
| private boolean | |
| private int | |
| private AudioFormat | |
| private float[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Implements javax. Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer. |
| public void | close()
Implements javax. Closes the line, indicating that any system resources in use by the line can be released. |
| public void | drain()
Implements javax. Drains queued data from the line by continuing data I/O until the data line's internal buffer has been emptied. |
| public void | |
| public int | getBufferSize()
Implements javax. Obtains the maximum number of bytes of data that will fit in the data line's internal buffer. |
| public AudioFormat | getFormat()
Implements javax. Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data. |
| public int | getFramePosition()
Implements javax. Obtains the current position in the audio data, in sample frames. |
| public float | getLevel()
Implements javax. Obtains the current volume level for the line. |
| public long | getLongFramePosition()
Implements javax. Obtains the current position in the audio data, in sample frames. |
| public long | getMicrosecondPosition()
Implements javax. Obtains the current position in the audio data, in microseconds. |
| public boolean | isActive()
Implements javax. Indicates whether the line is engaging in active I/O (such as playback or capture). |
| public boolean | isOpen()
Implements javax. 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. |
| public boolean | isRunning()
Implements javax. Indicates whether the line is running. |
| public void | open()
Implements javax. Opens the line, indicating that it should acquire any required system resources and become operational. |
| public void | open(AudioFormat format)
Implements javax. Opens the line with the specified format, causing the line to acquire any required system resources and become operational. |
| public void | open(AudioFormat format, int bufferSize)
Implements javax. Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational. |
| protected void | processAudioLogic(SoftAudioBuffer[] buffers)
Implements abstract com.
|
| protected void | processControlLogic()
Implements abstract com.
|
| public void | |
| public void | |
| public int | write(byte[] b, int off, int len)
Implements javax. Writes audio data to the mixer via this source data line. |
| _active | back to summary |
|---|---|
| private boolean _active | |
| _eff1gain | back to summary |
|---|---|
| private float _eff1gain | |
| _eff2gain | back to summary |
|---|---|
| private float _eff2gain | |
| _leftgain | back to summary |
|---|---|
| private float _leftgain | |
| _rightgain | back to summary |
|---|---|
| private float _rightgain | |
| active | back to summary |
|---|---|
| private boolean active | |
| afis | back to summary |
|---|---|
| private AudioFloatInputStream afis | |
| bufferSize | back to summary |
|---|---|
| private int bufferSize | |
| cycling_avail | back to summary |
|---|---|
| private int cycling_avail | |
| cycling_buffer | back to summary |
|---|---|
| private byte[] cycling_buffer | |
| cycling_framepos | back to summary |
|---|---|
| private long cycling_framepos | |
| cycling_read_pos | back to summary |
|---|---|
| private int cycling_read_pos | |
| cycling_write_pos | back to summary |
|---|---|
| private int cycling_write_pos | |
| format | back to summary |
|---|---|
| private AudioFormat format | |
| framesize | back to summary |
|---|---|
| private int framesize | |
| in_nrofchannels | back to summary |
|---|---|
| private int in_nrofchannels | |
| open | back to summary |
|---|---|
| private boolean open | |
| out_nrofchannels | back to summary |
|---|---|
| private int out_nrofchannels | |
| outputformat | back to summary |
|---|---|
| private AudioFormat outputformat | |
| readbuffer | back to summary |
|---|---|
| private float[] readbuffer | |
| SoftMixingSourceDataLine | back to summary |
|---|---|
| pack-priv SoftMixingSourceDataLine(SoftMixingMixer mixer, DataLine. | |
| available | back to summary |
|---|---|
| public int available() Implements javax. Doc from javax. Obtains the number of bytes of data currently available to the application for processing in the data line's internal buffer. For a source data line, this is the amount of data that can be written to the buffer without blocking. For a target data line, this is the amount of data available to be read by the application. For a clip, this value is always 0 because the audio data is loaded into the buffer when the clip is opened, and persists without modification until the clip is closed. Note that the units used are bytes, but will always correspond to an integral number of sample frames of audio data.
An application is guaranteed that a read or write operation of up to the
number of bytes returned from
| |
| close | back to summary |
|---|---|
| public void close() Implements javax. Doc from javax. Closes the line, indicating that any system resources in use by the line
can be released. If this operation succeeds, the line is marked closed
and a
| |
| drain | back to summary |
|---|---|
| public void drain() Implements javax. Doc from javax. Drains queued data from the line by continuing data I/O until the data
line's internal buffer has been emptied. This method blocks until the
draining is complete. Because this is a blocking method, it should be
used with care. If
| |
| flush | back to summary |
|---|---|
| public void flush() Implements javax. Doc from javax. Flushes queued data from the line. The flushed data is discarded. In some cases, not all queued data can be discarded. For example, a mixer can flush data from the buffer for a specific input line, but any unplayed data already in the output buffer (the result of the mix) will still be played. You can invoke this method after pausing a line (the normal case) if you want to skip the "stale" data when you restart playback or capture. (It is legal to flush a line that is not stopped, but doing so on an active line is likely to cause a discontinuity in the data, resulting in a perceptible click.)
| |
| getBufferSize | back to summary |
|---|---|
| public int getBufferSize() Implements javax. Doc from javax. Obtains the maximum number of bytes of data that will fit in the data line's internal buffer. For a source data line, this is the size of the 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.
| |
| getFormat | back to summary |
|---|---|
| public AudioFormat getFormat() Implements javax. Doc from javax. Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
If the line is not open and has never been opened, it returns the default
format. The default format is an implementation specific audio format,
or, if the
| |
| getFramePosition | back to summary |
|---|---|
| public int getFramePosition() Implements javax. Doc from javax. Obtains the current position in the audio data, in sample frames. The
frame position measures the number of sample frames captured by, or
rendered from, the line since it was opened. This return value will wrap
around after 2^31 frames. It is recommended to use
| |
| getLevel | back to summary |
|---|---|
| public float getLevel() Implements javax. Doc from javax. Obtains the current volume level for the line. This level is a measure of the signal's current amplitude, and should not be confused with the current setting of a gain control. The range is from 0.0 (silence) to 1.0 (maximum possible amplitude for the sound waveform). The units measure linear amplitude, not decibels.
| |
| getLongFramePosition | back to summary |
|---|---|
| public long getLongFramePosition() Implements javax. Doc from javax. Obtains the current position in the audio data, in sample frames. The frame position measures the number of sample frames captured by, or rendered from, the line since it was opened.
| |
| getMicrosecondPosition | back to summary |
|---|---|
| public long getMicrosecondPosition() Implements javax. Doc from javax. Obtains the current position in the audio data, in microseconds. The microsecond position measures the time corresponding to the number of sample frames captured by, or rendered from, the line since it was opened. The level of precision is not guaranteed. For example, an implementation might calculate the microsecond position from the current frame position and the audio sample frame rate. The precision in microseconds would then be limited to the number of microseconds per sample frame.
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements javax. Doc from javax. Indicates whether the line is engaging in active I/O (such as playback or
capture). When an inactive line becomes active, it sends a
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements javax. Doc from javax. 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.
| |
| isRunning | back to summary |
|---|---|
| public boolean isRunning() Implements javax. Doc from javax. Indicates whether the line is running. The default is
| |
| open | back to summary |
|---|---|
| public void open() throws LineUnavailableException Implements javax. Doc from javax. Opens the line, indicating that it should acquire any required system
resources and become operational. If this operation succeeds, the line is
marked as open, and an
Note that some lines, once closed, cannot be reopened. Attempts to reopen
such a line will always result in an
Some types of lines have configurable properties that may affect resource
allocation. For example, a
This method takes no arguments, and opens the line with the current
settings. For
For
| |
| open | back to summary |
|---|---|
| public void open(AudioFormat format) throws LineUnavailableException Implements javax. Doc from javax. Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
The implementation chooses a buffer size, which is measured in bytes but
which encompasses an integral number of sample frames. The buffer size
that the system has chosen may be queried by subsequently calling
If this operation succeeds, the line is marked as open, and an
Invoking this method on a line which is already open is illegal and may
result in an
Note that some lines, once closed, cannot be reopened. Attempts to reopen
such a line will always result in a
| |
| open | back to summary |
|---|---|
| public void open(AudioFormat format, int bufferSize) throws LineUnavailableException Implements javax. Doc from javax. Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
The buffer size is specified in bytes, but must represent an integral
number of sample frames. Invoking this method with a requested buffer
size that does not meet this requirement may result in an
If this operation succeeds, the line is marked as open, and an
Invoking this method on a line which is already open is illegal and may
result in an
Note that some lines, once closed, cannot be reopened. Attempts to reopen
such a line will always result in a
| |
| processAudioLogic | back to summary |
|---|---|
| protected void processAudioLogic(SoftAudioBuffer[] buffers) Implements abstract com.
| |
| processControlLogic | back to summary |
|---|---|
| protected void processControlLogic() Implements abstract com.
| |
| start | back to summary |
|---|---|
| public void start() Implements javax. Doc from javax. Allows a line to engage in data I/O. If invoked on a line that is already
running, this method does nothing. Unless the data in the buffer has been
flushed, the line resumes I/O starting with the first frame that was
unprocessed at the time the line was stopped. When audio capture or
playback starts, a
| |
| stop | back to summary |
|---|---|
| public void stop() Implements javax. Doc from javax. Stops the line. A stopped line should cease I/O activity. If the line is
open and running, however, it should retain the resources required to
resume activity. A stopped line should retain any audio data in its
buffer instead of discarding it, so that upon resumption the I/O can
continue where it left off, if possible. (This doesn't guarantee that
there will never be discontinuities beyond the current buffer, of course;
if the stopped condition continues for too long, input or output samples
might be dropped.) If desired, the retained data can be discarded by
invoking the
| |
| write | back to summary |
|---|---|
| public int write(byte[] b, int off, int len) Implements javax. Doc from javax. Writes audio data to the mixer via this source data line. The requested
number of bytes of data are read from the specified array, starting at
the given offset into the array, and written to the data line's buffer.
If the caller attempts to write more data than can currently be written
(see
The number of bytes that can be written without blocking can be
ascertained using the The number of bytes to write must represent an integral number of sample frames, such that:
The return value will always meet this requirement. A request to write a
number of bytes representing a non-integral number of sample frames
cannot be fulfilled and may result in an
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv AudioFloatInputStream |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public void | |
| public AudioFormat | |
| public long | |
| public void | |
| public boolean | |
| public int | read(float[] b, int off, int len)
Implements abstract com.
|
| public void | |
| public long |
| ais | back to summary |
|---|---|
| pack-priv AudioFloatInputStream ais | |
| NonBlockingFloatInputStream | back to summary |
|---|---|
| pack-priv NonBlockingFloatInputStream(AudioFloatInputStream ais) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Implements abstract com.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract com.
| |
| getFormat | back to summary |
|---|---|
| public AudioFormat getFormat() Implements abstract com.
| |
| getFrameLength | back to summary |
|---|---|
| public long getFrameLength() Implements abstract com.
| |
| mark | back to summary |
|---|---|
| public void mark(int readlimit) Implements abstract com.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Implements abstract com.
| |
| read | back to summary |
|---|---|
| public int read(float[] b, int off, int len) throws IOException Implements abstract com.
| |
| reset | back to summary |
|---|---|
| public void reset() throws IOException Implements abstract com.
| |
| skip | back to summary |
|---|---|
| public long skip(long len) throws IOException Implements abstract com.
| |