Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]
com.sun.media.sound
abstract class: AbstractDataLine [javadoc | source]
java.lang.Object
   com.sun.media.sound.AbstractLine
      com.sun.media.sound.AbstractDataLine

All Implemented Interfaces:
    DataLine, Line

Direct Known Subclasses:
    DirectDL, DirectTDL, DirectSDL, DirectClip

AbstractDataLine
Field Summary
protected  AudioFormat defaultFormat     
protected  int defaultBufferSize     
protected  Object lock     
protected  AudioFormat format     
protected  int bufferSize     
protected  boolean running     
Fields inherited from com.sun.media.sound.AbstractLine:
info,  controls,  mixer
Constructor:
 protected AbstractDataLine(Info info,
    AbstractMixer mixer,
    Control[] controls) 
    Constructs a new AbstractLine.
 protected AbstractDataLine(Info info,
    AbstractMixer mixer,
    Control[] controls,
    AudioFormat format,
    int bufferSize) 
    Constructs a new AbstractLine.
Method from com.sun.media.sound.AbstractDataLine Summary:
available,   close,   drain,   flush,   getBufferSize,   getFormat,   getLevel,   getMicrosecondPosition,   implClose,   implOpen,   implStart,   implStop,   isActive,   isRunning,   isStartedRunning,   open,   open,   open,   setActive,   setBufferSize,   setEOM,   setStarted,   start,   stop
Methods from com.sun.media.sound.AbstractLine:
addLineListener,   close,   getControl,   getControls,   getEventDispatcher,   getFramePosition,   getLineInfo,   getLongFramePosition,   getMixer,   isControlSupported,   isOpen,   open,   removeLineListener,   sendEvents,   setOpen
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.media.sound.AbstractDataLine Detail:
 public int available() 
    This implementation always returns 0.
 public  void close() 
    This should also stop the line. The closed line should not be running or active. After we close the line, we reset the format and buffer size to the defaults.
 public  void drain() 
    This implementation does nothing.
 public  void flush() 
    This implementation does nothing.
 public int getBufferSize() 
 public AudioFormat getFormat() 
 public float getLevel() 
    This implementation returns AudioSystem.NOT_SPECIFIED.
 public long getMicrosecondPosition() 
 abstract  void implClose()
 abstract  void implOpen(AudioFormat format,
    int bufferSize) throws LineUnavailableException
 abstract  void implStart()
 abstract  void implStop()
 public boolean isActive() 
 public boolean isRunning() 
 protected boolean isStartedRunning() 
    running is true after start is called and before stop is called, regardless of whether data is actually being presented.
 public  void open() throws LineUnavailableException 
    Try to open the line with the current format and buffer size values. If the line is not open, these will be the defaults. If the line is open, this should return quietly because the values requested will match the current ones.
 public  void open(AudioFormat format) throws LineUnavailableException 
 public  void open(AudioFormat format,
    int bufferSize) throws LineUnavailableException 
 protected  void setActive(boolean active) 
    This method sets the active state and generates events if it changes.
 public int setBufferSize(int newSize) 
    This implementation does NOT change the buffer size
 protected  void setEOM() 
    This method generates a STOP event and sets the started state to false. It is here for historic reasons when an EOM event existed.
 protected  void setStarted(boolean started) 
    This method sets the started state and generates events if it changes.
 public  void start() 
 public  void stop()