org.tritonus.sampled.mixer.alsa
Class AlsaBaseDataLine

java.lang.Object
  extended byorg.tritonus.share.sampled.mixer.TLine
      extended byorg.tritonus.share.sampled.mixer.TDataLine
          extended byorg.tritonus.share.sampled.mixer.TBaseDataLine
              extended byorg.tritonus.sampled.mixer.alsa.AlsaBaseDataLine
All Implemented Interfaces:
DataLine, Line
Direct Known Subclasses:
AlsaSourceDataLine, AlsaTargetDataLine

public abstract class AlsaBaseDataLine
extends TBaseDataLine


Nested Class Summary
 class AlsaBaseDataLine.AlsaBaseDataLineGainControl
           
 
Nested classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
 
Constructor Summary
AlsaBaseDataLine(AlsaDataLineMixer mixer, DataLine.Info info)
           
AlsaBaseDataLine(AlsaDataLineMixer mixer, DataLine.Info info, Collection controls)
           
 
Method Summary
 int available()
           
protected  void closeImpl()
          Subclasses should override this method.
 void drain()
           
 void flush()
           
protected  AlsaDataLineMixer getAlsaDataLineMixer()
           
protected  AlsaPcm getAlsaPcm()
           
protected abstract  int getAlsaStreamType()
          Returns the ALSA stream type of this line.
protected  int getBytesPerSample()
           
protected  boolean getSwapBytes()
           
protected  void openImpl()
          Subclasses should override this method.
protected  void stopImpl()
           
 
Methods inherited from class org.tritonus.share.sampled.mixer.TBaseDataLine
finalize, open, open
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener
 

Constructor Detail

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
Method Detail

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()