org.tritonus.sampled.mixer.alsa
Class AlsaSourceDataLine

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
                  extended byorg.tritonus.sampled.mixer.alsa.AlsaSourceDataLine
All Implemented Interfaces:
DataLine, Line, SourceDataLine

public class AlsaSourceDataLine
extends AlsaBaseDataLine
implements SourceDataLine


Nested Class Summary
 class AlsaSourceDataLine.AlsaSourceDataLineGainControl
           
 
Nested classes inherited from class org.tritonus.sampled.mixer.alsa.AlsaBaseDataLine
AlsaBaseDataLine.AlsaBaseDataLineGainControl
 
Nested classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
 
Constructor Summary
AlsaSourceDataLine(AlsaDataLineMixer mixer, AudioFormat format, int nBufferSize)
           
 
Method Summary
 int available()
           
 void drain()
           
 void flush()
           
protected  int getAlsaStreamType()
          Returns the ALSA stream type of this line.
protected  void stopImpl()
           
 int write(byte[] abData, int nOffset, int nLength)
           
 
Methods inherited from class org.tritonus.sampled.mixer.alsa.AlsaBaseDataLine
closeImpl, getAlsaDataLineMixer, getAlsaPcm, getBytesPerSample, getSwapBytes, openImpl
 
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.SourceDataLine
open, open
 
Methods inherited from interface javax.sound.sampled.DataLine
getBufferSize, getFormat, getFramePosition, getLevel, getMicrosecondPosition, isActive, isRunning, start, stop
 
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener
 

Constructor Detail

AlsaSourceDataLine

public AlsaSourceDataLine(AlsaDataLineMixer mixer,
                          AudioFormat format,
                          int nBufferSize)
                   throws LineUnavailableException
Throws:
LineUnavailableException
Method Detail

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

write

public int write(byte[] abData,
                 int nOffset,
                 int nLength)
Specified by:
write in interface SourceDataLine

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