|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pscode.xui.sound.bigclip.BigClip
public class BigClip
An implementation of the javax.sound.sampled.Clip that is designed to handle Clips of arbitrary size, limited only by the amount of memory available to the app. It uses the post 1.4 thread behaviour (daemon thread) that will stop the sound running after the main has exited.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.sound.sampled.DataLine |
|---|
DataLine.Info |
| Field Summary |
|---|
| Fields inherited from interface javax.sound.sampled.Clip |
|---|
LOOP_CONTINUOUSLY |
| Constructor Summary | |
|---|---|
BigClip()
Default constructor for a BigClip. |
|
BigClip(Clip clip)
There are a number of AudioSystem methods that will return a configured Clip. |
|
| Method Summary | |
|---|---|
void |
addLineListener(LineListener listener)
|
int |
available()
|
void |
close()
|
void |
drain()
|
void |
flush()
|
byte[] |
getAudioData()
Provides the entire audio buffer of this clip. |
int |
getBufferSize()
|
Control |
getControl(Control.Type control)
|
Control[] |
getControls()
|
AudioFormat |
getFormat()
|
int |
getFrameLength()
|
int |
getFramePosition()
|
float |
getLevel()
|
Line.Info |
getLineInfo()
|
long |
getLongFramePosition()
|
long |
getMicrosecondLength()
|
long |
getMicrosecondPosition()
|
boolean |
isActive()
|
boolean |
isControlSupported(Control.Type control)
|
boolean |
isOpen()
|
boolean |
isRunning()
|
void |
loop(int count)
|
void |
open()
|
void |
open(AudioFormat format,
byte[] data,
int offset,
int bufferSize)
|
void |
open(AudioInputStream stream)
|
void |
removeLineListener(LineListener listener)
|
void |
setFramePosition(int frames)
|
void |
setLoopPoints(int start,
int end)
|
void |
setMicrosecondPosition(long milliseconds)
|
void |
setParentComponent(Component parent)
Sets a parent component to act as owner of a "Loading track.." progress dialog. |
void |
start()
TODO - fix bug in LOOP_CONTINUOUSLY |
void |
stop()
|
void |
update(LineEvent le)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BigClip()
public BigClip(Clip clip)
throws LineUnavailableException
clip - Clip The Clip used to configure the BigClip.
LineUnavailableException| Method Detail |
|---|
public byte[] getAudioData()
public void setParentComponent(Component parent)
public void update(LineEvent le)
update in interface LineListenerpublic void loop(int count)
loop in interface Clip
public void setLoopPoints(int start,
int end)
setLoopPoints in interface Clippublic void setMicrosecondPosition(long milliseconds)
setMicrosecondPosition in interface Clippublic long getMicrosecondPosition()
getMicrosecondPosition in interface DataLinepublic long getMicrosecondLength()
getMicrosecondLength in interface Clippublic void setFramePosition(int frames)
setFramePosition in interface Clippublic int getFramePosition()
getFramePosition in interface DataLinepublic int getFrameLength()
getFrameLength in interface Clip
public void open(AudioInputStream stream)
throws IOException,
LineUnavailableException
open in interface ClipIOException
LineUnavailableException
public void open(AudioFormat format,
byte[] data,
int offset,
int bufferSize)
throws LineUnavailableException
open in interface ClipLineUnavailableExceptionpublic float getLevel()
getLevel in interface DataLinepublic long getLongFramePosition()
getLongFramePosition in interface DataLinepublic int available()
available in interface DataLinepublic int getBufferSize()
getBufferSize in interface DataLinepublic AudioFormat getFormat()
getFormat in interface DataLinepublic boolean isActive()
isActive in interface DataLinepublic boolean isRunning()
isRunning in interface DataLinepublic boolean isOpen()
isOpen in interface Linepublic void stop()
stop in interface DataLinepublic void start()
start in interface DataLinepublic void flush()
flush in interface DataLinepublic void drain()
drain in interface DataLinepublic void removeLineListener(LineListener listener)
removeLineListener in interface Linepublic void addLineListener(LineListener listener)
addLineListener in interface Linepublic Control getControl(Control.Type control)
getControl in interface Linepublic Control[] getControls()
getControls in interface Linepublic boolean isControlSupported(Control.Type control)
isControlSupported in interface Linepublic void close()
close in interface Line
public void open()
throws LineUnavailableException
open in interface LineLineUnavailableExceptionpublic Line.Info getLineInfo()
getLineInfo in interface Line
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||