org.tritonus.share.sampled.mixer
Class TDataLine

java.lang.Object
  extended byorg.tritonus.share.sampled.mixer.TLine
      extended byorg.tritonus.share.sampled.mixer.TDataLine
All Implemented Interfaces:
DataLine, Line
Direct Known Subclasses:
EsdClip, TBaseDataLine, TClip

public abstract class TDataLine
extends TLine
implements DataLine

Base class for classes implementing DataLine.


Nested Class Summary
 
Nested classes inherited from class javax.sound.sampled.DataLine
DataLine.Info
 
Constructor Summary
TDataLine(TMixer mixer, DataLine.Info info)
           
TDataLine(TMixer mixer, DataLine.Info info, Collection controls)
           
 
Method Summary
protected  void checkOpen()
           
 int getBufferSize()
           
protected  int getDefaultBufferSize()
           
 AudioFormat getFormat()
           
 int getFramePosition()
           
 float getLevel()
           
 long getMicrosecondPosition()
           
 boolean isActive()
          This implementation returns the status of isRunning().
 boolean isRunning()
           
protected  void notifyLineEvent(LineEvent.Type type)
           
protected  void setBufferSize(int nBufferSize)
           
protected  void setFormat(AudioFormat format)
           
protected  void setRunning(boolean bRunning)
           
 void start()
           
protected  void startImpl()
           
 void stop()
           
protected  void stopImpl()
           
 
Methods inherited from class org.tritonus.share.sampled.mixer.TLine
addControl, addLineListener, close, closeImpl, getControl, getControls, getLineInfo, getMixer, isControlSupported, isOpen, notifyLineEvent, open, openImpl, removeControl, removeLineListener, setLineInfo, setOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sound.sampled.DataLine
available, drain, flush
 
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener
 

Constructor Detail

TDataLine

public TDataLine(TMixer mixer,
                 DataLine.Info info)

TDataLine

public TDataLine(TMixer mixer,
                 DataLine.Info info,
                 Collection controls)
Method Detail

start

public void start()
Specified by:
start in interface DataLine

stop

public void stop()
Specified by:
stop in interface DataLine

isRunning

public boolean isRunning()
Specified by:
isRunning in interface DataLine

setRunning

protected void setRunning(boolean bRunning)

startImpl

protected void startImpl()

stopImpl

protected void stopImpl()

isActive

public boolean isActive()
This implementation returns the status of isRunning(). Subclasses should overwrite this method if there is more precise information about the status of the line available.

Specified by:
isActive in interface DataLine

getFormat

public AudioFormat getFormat()
Specified by:
getFormat in interface DataLine

setFormat

protected void setFormat(AudioFormat format)

getBufferSize

public int getBufferSize()
Specified by:
getBufferSize in interface DataLine

setBufferSize

protected void setBufferSize(int nBufferSize)

getFramePosition

public int getFramePosition()
Specified by:
getFramePosition in interface DataLine

getMicrosecondPosition

public long getMicrosecondPosition()
Specified by:
getMicrosecondPosition in interface DataLine

getLevel

public float getLevel()
Specified by:
getLevel in interface DataLine

checkOpen

protected void checkOpen()

getDefaultBufferSize

protected int getDefaultBufferSize()

notifyLineEvent

protected void notifyLineEvent(LineEvent.Type type)
Overrides:
notifyLineEvent in class TLine