All Implemented Interfaces:
DataLine
Clip interface represents a special kind of data line whose
audio data can be loaded prior to playback, instead of being streamed in
real time.
Because the data is pre-loaded and has a known length, you can set a clip to start playing at any position in its audio data. You can also create a loop, so that when the clip is played it will cycle repeatedly. Loops are specified with a starting and ending sample frame, along with the number of times that the loop should be played.
Clips may be obtained from a Mixer that supports lines
of this type. Data is loaded into a clip when it is opened.
Playback of an audio clip may be started and stopped using the start
and stop methods. These methods do not reset the media position;
start causes playback to continue from the position where playback
was last stopped. To restart playback from the beginning of the clip's audio
data, simply follow the invocation of stop
with setFramePosition(0), which rewinds the media to the beginning
of the clip.
Kara - Kytle1.3 - | Field Summary | ||
|---|---|---|
| public static final int | LOOP_CONTINUOUSLY | A value indicating that looping should continue indefinitely rather than
complete after a specific number of loops.
|
| Method from javax.sound.sampled.Clip Summary: |
|---|
| getFrameLength, getMicrosecondLength, loop, open, open, setFramePosition, setLoopPoints, setMicrosecondPosition |
| Method from javax.sound.sampled.Clip Detail: |
|---|
|
|
count times, and finally continue playback to the end of
the clip.
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 event is dispatched
to the line's listeners.
Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.
Note that some lines, once closed, cannot be reopened. Attempts
to reopen such a line will always result in a
|
OPEN event is dispatched
to the line's listeners.
Invoking this method on a line which is already open is illegal and may result in an IllegalStateException.
Note that some lines, once closed, cannot be reopened. Attempts
to reopen such a line will always result in a
|
To obtain the current position in sample frames, use the
|
|
To obtain the current position in microseconds, use the
|