|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.spi.asio.ASIODataLine
This class implements SourceDataLine as well as TargetDataLine because input and output processing is similar in ASIO. All lines provided by the ASIOMixer will be instances of this class.
| Nested Class Summary |
|---|
| Nested classes inherited from class javax.sound.sampled.DataLine |
|---|
javax.sound.sampled.DataLine.Info |
| Nested classes inherited from class javax.sound.sampled.DataLine |
|---|
javax.sound.sampled.DataLine.Info |
| Field Summary | |
|---|---|
(package private) java.nio.ByteBuffer[][] |
asioBuffers
The real asioBuffers. |
(package private) int |
channels
Number of channels associated with this line right now |
private javax.sound.sampled.Control[] |
controls
the Controls for this line |
private int |
desiredBufferSize
The buffersize in bytes specified to open(AudioFormat, int) |
private byte[] |
emptyArray
an empty array for flushing |
private boolean |
flushed
indicates whether flus() has been called lately on this line |
private javax.sound.sampled.AudioFormat |
format
The format of this line when its running |
private int |
frameSize
frameSize of the current format |
private ASIOLineInfo |
info
THE ASIOLineInfo object corresponding to this line |
private java.util.ArrayList |
listeners
List of the registered LineListeners |
private ASIOMixer |
mixer
The ASIOMixer instance which created this line |
private boolean |
open
Indicates if this line is open |
private long |
openSeq
Sequence number used when opening this line. |
(package private) DoubleHalfRingBuffer[] |
ringBuffers
A RingBuffer for each channel wrapped around the two buffer halfs |
private int |
sampleSize
sample size of the current format |
private boolean |
started
indicates whether this line has been started or not |
| Constructor Summary | |
|---|---|
ASIODataLine(ASIOMixer mixer,
ASIOLineInfo info)
|
|
| Method Summary | |
|---|---|
void |
addLineListener(javax.sound.sampled.LineListener listener)
|
int |
available()
|
void |
close()
|
(package private) void |
closed()
called from the Mixer to indicate that this line has been closed |
void |
drain()
|
void |
finalize()
|
void |
flush()
|
int |
getBufferSize()
|
(package private) int |
getChannel()
Get the channel index of the first channel that belongs to this line |
javax.sound.sampled.Control |
getControl(javax.sound.sampled.Control.Type control)
Will return a Clock Source Control for Selection of the Clock Source |
javax.sound.sampled.Control[] |
getControls()
Will return a Clock Source Control for Selection of the Clock Source |
javax.sound.sampled.AudioFormat |
getFormat()
|
int |
getFramePosition()
|
float |
getLevel()
ASIO doesn't support this. |
javax.sound.sampled.Line.Info |
getLineInfo()
|
long |
getMicrosecondPosition()
|
(package private) ASIOMixer |
getMixer()
Get the ASIOMixer to which this Line belongs |
boolean |
isActive()
|
boolean |
isControlSupported(javax.sound.sampled.Control.Type control)
Only a Clock Source Control for Selection of the Clock Source is supported |
boolean |
isInput()
Tells if this Line is used as In- or Output |
boolean |
isOpen()
|
boolean |
isRunning()
|
private void |
notifyListeners(javax.sound.sampled.LineEvent e)
Notify the line listeners |
void |
open()
If no arguments are specified to open(), the preferred buffer
size will be used and the Format will be Mono with the preferred Sample Rate |
void |
open(javax.sound.sampled.AudioFormat format)
|
void |
open(javax.sound.sampled.AudioFormat format,
int buffersize)
|
(package private) void |
opened(long seq,
java.nio.ByteBuffer[][] buffers)
called from the Mixer to indicate that this line has been opened |
int |
read(byte[] b,
int off,
int len)
|
void |
removeLineListener(javax.sound.sampled.LineListener listener)
|
void |
start()
|
(package private) void |
started()
called from the Mixer to indicate that this line has been started |
void |
stop()
|
(package private) void |
stopped()
called from the Mixer to indicate that this line has been stopped |
int |
write(byte[] b,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.nio.ByteBuffer[][] asioBuffers
int channels
private javax.sound.sampled.Control[] controls
private int desiredBufferSize
private byte[] emptyArray
private boolean flushed
private javax.sound.sampled.AudioFormat format
private int frameSize
private ASIOLineInfo info
private java.util.ArrayList listeners
private ASIOMixer mixer
private boolean open
private long openSeq
DoubleHalfRingBuffer[] ringBuffers
private int sampleSize
private boolean started
| Constructor Detail |
|---|
ASIODataLine(ASIOMixer mixer,
ASIOLineInfo info)
| Method Detail |
|---|
public void addLineListener(javax.sound.sampled.LineListener listener)
addLineListener in interface javax.sound.sampled.Linepublic int available()
available in interface javax.sound.sampled.DataLinepublic void close()
close in interface javax.sound.sampled.Linevoid closed()
public void drain()
drain in interface javax.sound.sampled.DataLinepublic void finalize()
finalize in class java.lang.Objectpublic void flush()
flush in interface javax.sound.sampled.DataLinepublic int getBufferSize()
getBufferSize in interface javax.sound.sampled.DataLineint getChannel()
public javax.sound.sampled.Control getControl(javax.sound.sampled.Control.Type control)
getControl in interface javax.sound.sampled.LineLine.getControl(javax.sound.sampled.Control.Type)public javax.sound.sampled.Control[] getControls()
getControls in interface javax.sound.sampled.LineLine.getControls()public javax.sound.sampled.AudioFormat getFormat()
getFormat in interface javax.sound.sampled.DataLinepublic int getFramePosition()
getFramePosition in interface javax.sound.sampled.DataLinepublic float getLevel()
AudioSystem.NOT_SPECIFIED will be returned.
getLevel in interface javax.sound.sampled.DataLineDataLine.getLevel()public javax.sound.sampled.Line.Info getLineInfo()
getLineInfo in interface javax.sound.sampled.Linepublic long getMicrosecondPosition()
getMicrosecondPosition in interface javax.sound.sampled.DataLineASIOMixer getMixer()
public boolean isActive()
isActive in interface javax.sound.sampled.DataLinepublic boolean isControlSupported(javax.sound.sampled.Control.Type control)
isControlSupported in interface javax.sound.sampled.LineLine.isControlSupported(javax.sound.sampled.Control.Type)public boolean isInput()
public boolean isOpen()
isOpen in interface javax.sound.sampled.Linepublic boolean isRunning()
isRunning in interface javax.sound.sampled.DataLineprivate void notifyListeners(javax.sound.sampled.LineEvent e)
e - The LineEvent
public void open()
throws javax.sound.sampled.LineUnavailableException
open(), the preferred buffer
size will be used and the Format will be Mono with the preferred Sample Rate
open in interface javax.sound.sampled.Linejavax.sound.sampled.LineUnavailableExceptionLine.open()
public void open(javax.sound.sampled.AudioFormat format)
throws javax.sound.sampled.LineUnavailableException
open in interface javax.sound.sampled.SourceDataLinejavax.sound.sampled.LineUnavailableException
public void open(javax.sound.sampled.AudioFormat format,
int buffersize)
throws javax.sound.sampled.LineUnavailableException
open in interface javax.sound.sampled.SourceDataLinejavax.sound.sampled.LineUnavailableException
void opened(long seq,
java.nio.ByteBuffer[][] buffers)
seq - The sequence number that should be used for closingbuffers - The asioBuffers
public int read(byte[] b,
int off,
int len)
read in interface javax.sound.sampled.TargetDataLinepublic void removeLineListener(javax.sound.sampled.LineListener listener)
removeLineListener in interface javax.sound.sampled.Linepublic void start()
start in interface javax.sound.sampled.DataLinevoid started()
public void stop()
stop in interface javax.sound.sampled.DataLinevoid stopped()
public int write(byte[] b,
int off,
int len)
write in interface javax.sound.sampled.SourceDataLine
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||