| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private float | |
| private float | |
| private int | |
| private float | |
| private int | |
| private int | |
| private int | |
| private float | |
| private boolean | |
| private boolean | |
| private AudioFloatInputStream | |
| private int | |
| private byte[] | |
| private final InputStream | |
| private AudioFormat | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| 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 | getFrameLength()
Implements javax. Obtains the media length in sample frames. |
| 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 | getMicrosecondLength()
Implements javax. Obtains the media duration in microseconds. |
| 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 | loop(int count)
Implements javax. Starts looping playback from the current position. |
| public void | open(AudioInputStream stream)
Implements javax. Opens the clip with the format and audio data present in the provided audio input stream. |
| public void | open(AudioFormat format, byte[] data, int offset, int bufferSize)
Implements javax. Opens the clip, meaning that it should acquire any required system resources and become operational. |
| public void | open()
Implements javax. Opens the line, indicating that it should acquire any required system resources and become operational. |
| protected void | processAudioLogic(SoftAudioBuffer[] buffers)
Implements abstract com.
|
| protected void | processControlLogic()
Implements abstract com.
|
| public void | setFramePosition(int frames)
Implements javax. Sets the media position in sample frames. |
| public void | setLoopPoints(int start, int end)
Implements javax. Sets the first and last sample frames that will be played in the loop. |
| public void | setMicrosecondPosition(long microseconds)
Implements javax. Sets the media position in microseconds. |
| public void | |
| public void |
| _active | back to summary |
|---|---|
| private boolean _active | |
| _eff1gain | back to summary |
|---|---|
| private float _eff1gain | |
| _eff2gain | back to summary |
|---|---|
| private float _eff2gain | |
| _frameposition | back to summary |
|---|---|
| private int _frameposition | |
| _leftgain | back to summary |
|---|---|
| private float _leftgain | |
| _loopcount | back to summary |
|---|---|
| private int _loopcount | |
| _loopend | back to summary |
|---|---|
| private int _loopend | |
| _loopstart | back to summary |
|---|---|
| private int _loopstart | |
| _rightgain | back to summary |
|---|---|
| private float _rightgain | |
| active | back to summary |
|---|---|
| private boolean active | |
| active_sg | back to summary |
|---|---|
| private boolean active_sg | |
| afis | back to summary |
|---|---|
| private AudioFloatInputStream afis | |
| bufferSize | back to summary |
|---|---|
| private int bufferSize | |
| data | back to summary |
|---|---|
| private byte[] data | |
| datastream | back to summary |
|---|---|
| private final InputStream datastream | |
| format | back to summary |
|---|---|
| private AudioFormat format | |
| frameposition | back to summary |
|---|---|
| private int frameposition | |
| frameposition_sg | back to summary |
|---|---|
| private boolean frameposition_sg | |
| framesize | back to summary |
|---|---|
| private int framesize | |
| in_nrofchannels | back to summary |
|---|---|
| private int in_nrofchannels | |
| loop_sg | back to summary |
|---|---|
| private boolean loop_sg | |
| loopcount | back to summary |
|---|---|
| private int loopcount | |
| loopend | back to summary |
|---|---|
| private int loopend | |
| loopstart | back to summary |
|---|---|
| private int loopstart | |
| offset | back to summary |
|---|---|
| private int offset | |
| 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 | |
| SoftMixingClip | back to summary |
|---|---|
| pack-priv SoftMixingClip(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
| |
| getFrameLength | back to summary |
|---|---|
| public int getFrameLength() Implements javax. Doc from javax. Obtains the media length in sample frames.
| |
| 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.
| |
| getMicrosecondLength | back to summary |
|---|---|
| public long getMicrosecondLength() Implements javax. Doc from javax. Obtains the media duration in microseconds.
| |
| 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
| |
| loop | back to summary |
|---|---|
| public void loop(int count) Implements javax. Doc from javax. Starts looping playback from the current position. Playback will continue
to the loop's end point, then loop back to the loop start point
If the current position when this method is invoked is greater than the loop end point, playback simply continues to the end of the clip without looping.
A If playback is stopped during looping, the current loop status is cleared; the behavior of subsequent loop and start requests is not affected by an interrupted loop operation.
| |
| open | back to summary |
|---|---|
| public void open(AudioInputStream stream) throws LineUnavailableException, IOException Implements javax. Doc from javax. Opens the clip with the format and audio data present in the provided
audio input stream. Opening a clip means that it should acquire any
required system resources and become operational. If this operation input
stream. If this operation succeeds, the line is marked 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, byte[] data, int offset, int bufferSize) throws LineUnavailableException Implements javax. Doc from javax. Opens the clip, meaning that it should acquire any required system
resources and become operational. The clip is opened with the format and
audio data indicated. 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() 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
| |
| processAudioLogic | back to summary |
|---|---|
| protected void processAudioLogic(SoftAudioBuffer[] buffers) Implements abstract com.
| |
| processControlLogic | back to summary |
|---|---|
| protected void processControlLogic() Implements abstract com.
| |
| setFramePosition | back to summary |
|---|---|
| public void setFramePosition(int frames) Implements javax. Doc from javax. Sets the media position in sample frames. The position is zero-based; the first frame is frame number zero. When the clip begins playing the next time, it will start by playing the frame at this position.
To obtain the current position in sample frames, use the
| |
| setLoopPoints | back to summary |
|---|---|
| public void setLoopPoints(int start, int end) Implements javax. Doc from javax. Sets the first and last sample frames that will be played in the loop. The ending point must be greater than or equal to the starting point, and both must fall within the size of the loaded media. A value of 0 for the starting point means the beginning of the loaded media. Similarly, a value of -1 for the ending point indicates the last frame of the media.
| |
| setMicrosecondPosition | back to summary |
|---|---|
| public void setMicrosecondPosition(long microseconds) Implements javax. Doc from javax. Sets the media position in microseconds. When the clip begins playing the next time, it will start at this position. 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.
To obtain the current position in microseconds, use the
| |
| 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
| |