org.tritonus.sampled.mixer.alsa
Class AlsaTargetDataLine
java.lang.Object
org.tritonus.share.sampled.mixer.TLine
org.tritonus.share.sampled.mixer.TDataLine
org.tritonus.share.sampled.mixer.TBaseDataLine
org.tritonus.sampled.mixer.alsa.AlsaBaseDataLine
org.tritonus.sampled.mixer.alsa.AlsaTargetDataLine
- All Implemented Interfaces:
- DataLine, Line, TargetDataLine
- public class AlsaTargetDataLine
- extends AlsaBaseDataLine
- implements TargetDataLine
Methods inherited from class org.tritonus.share.sampled.mixer.TDataLine |
checkOpen, getBufferSize, getDefaultBufferSize, getFormat, getFramePosition, getLevel, getMicrosecondPosition, isActive, isRunning, notifyLineEvent, setBufferSize, setFormat, setRunning, start, startImpl, stop |
Methods inherited from class org.tritonus.share.sampled.mixer.TLine |
addControl, addLineListener, close, getControl, getControls, getLineInfo, getMixer, isControlSupported, isOpen, notifyLineEvent, open, removeControl, removeLineListener, setLineInfo, setOpen |
AlsaTargetDataLine
public AlsaTargetDataLine(AlsaDataLineMixer mixer,
AudioFormat format,
int nBufferSize)
throws LineUnavailableException
- Throws:
LineUnavailableException
getAlsaStreamType
protected int getAlsaStreamType()
- Description copied from class:
AlsaBaseDataLine
- Returns the ALSA stream type of this line.
Subclasses must implement this method to return either
AlsaPcm.SND_PCM_STREAM_PLAYBACK or
AlsaPcm.SND_PCM_STREAM_CAPTURE.
The return value is used by this class to decide if it has
to deal with a source (PLAYBACK) or target (CAPTURE)
data line.
- Specified by:
getAlsaStreamType
in class AlsaBaseDataLine
stopImpl
protected void stopImpl()
- Overrides:
stopImpl
in class AlsaBaseDataLine
available
public int available()
- Specified by:
available
in interface DataLine
- Overrides:
available
in class AlsaBaseDataLine
read
public int read(byte[] abData,
int nOffset,
int nLength)
- Specified by:
read
in interface TargetDataLine
readImpl
public int readImpl(byte[] abData,
int nOffset,
int nLength)
drain
public void drain()
- Specified by:
drain
in interface DataLine
- Overrides:
drain
in class AlsaBaseDataLine
flush
public void flush()
- Specified by:
flush
in interface DataLine
- Overrides:
flush
in class AlsaBaseDataLine
getPosition
public long getPosition()