|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Clip
A Clip represents some pre-loaded audio data.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface javax.sound.sampled.DataLine |
---|
DataLine.Info |
Field Summary | |
---|---|
static int |
LOOP_CONTINUOUSLY
This can be passed to loop(int) to indicate that looping
should be done continuously. |
Method Summary | |
---|---|
int |
getFrameLength()
Return the frame length of this clip. |
long |
getMicrosecondLength()
Return the length of the clip in microseconds. |
void |
loop(int count)
Start looping the clip. |
void |
open(AudioFormat fmt,
byte[] data,
int offset,
int len)
Open a clip, given an audio format and some data. |
void |
open(AudioInputStream ais)
Open a clip, given an audio input stream. |
void |
setFramePosition(int where)
Set the position to the indicated frame. |
void |
setLoopPoints(int begin,
int end)
Set the loop begin and end points. |
void |
setMicrosecondPosition(long ms)
Set the position to the indicated microsecond. |
Methods inherited from interface javax.sound.sampled.DataLine |
---|
available, drain, flush, getBufferSize, getFormat, getFramePosition, getLevel, getLongFramePosition, getMicrosecondPosition, isActive, isRunning, start, stop |
Methods inherited from interface javax.sound.sampled.Line |
---|
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener |
Field Detail |
---|
static final int LOOP_CONTINUOUSLY
loop(int)
to indicate that looping
should be done continuously.
Method Detail |
---|
int getFrameLength()
long getMicrosecondLength()
void loop(int count)
count
- the number of times to loopvoid open(AudioFormat fmt, byte[] data, int offset, int len) throws LineUnavailableException
fmt
- the format of the datadata
- a byte array containing the audio dataoffset
- the offset of the first byte of data in the arraylen
- the length of the audio data in the array, in bytes
LineUnavailableException
- if the line cannot be opened
SecurityException
- if the line cannot be opened for security
reasonsvoid open(AudioInputStream ais) throws LineUnavailableException, IOException
ais
- the input stream
LineUnavailableException
- if the line cannot be opened
SecurityException
- if the line cannot be opened for security
reasons
IOException
- if there is an I/O error while reading the streamvoid setFramePosition(int where)
where
- new frame positionvoid setLoopPoints(int begin, int end)
begin
- the starting pointend
- the ending pointvoid setMicrosecondPosition(long ms)
ms
- the new position in microseconds
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |