org.tritonus.sampled.mixer.alsa
Class AlsaBaseDataLine
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
- All Implemented Interfaces:
- DataLine, Line
- Direct Known Subclasses:
- AlsaSourceDataLine, AlsaTargetDataLine
- public abstract class AlsaBaseDataLine
- extends TBaseDataLine
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 |
AlsaBaseDataLine
public AlsaBaseDataLine(AlsaDataLineMixer mixer,
DataLine.Info info)
throws LineUnavailableException
- Throws:
LineUnavailableException
AlsaBaseDataLine
public AlsaBaseDataLine(AlsaDataLineMixer mixer,
DataLine.Info info,
Collection controls)
throws LineUnavailableException
- Throws:
LineUnavailableException
getAlsaDataLineMixer
protected AlsaDataLineMixer getAlsaDataLineMixer()
getAlsaPcm
protected AlsaPcm getAlsaPcm()
getAlsaStreamType
protected abstract int getAlsaStreamType()
- 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.
getSwapBytes
protected boolean getSwapBytes()
getBytesPerSample
protected int getBytesPerSample()
openImpl
protected void openImpl()
throws LineUnavailableException
- Description copied from class:
TLine
- Subclasses should override this method.
- Overrides:
openImpl
in class TLine
- Throws:
LineUnavailableException
closeImpl
protected void closeImpl()
- Description copied from class:
TLine
- Subclasses should override this method.
- Overrides:
closeImpl
in class TLine
stopImpl
protected void stopImpl()
- Overrides:
stopImpl
in class TDataLine
available
public int available()
drain
public void drain()
flush
public void flush()