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

All Implemented Interfaces:
    Mixer, Line

Direct Known Subclasses:
    PortMixer, DirectAudioDevice

Abstract Mixer. Implements Mixer (with abstract methods) and specifies some other common methods for use by our implementation.
Field Summary
protected static final  int PCM     
protected static final  int ULAW     
protected static final  int ALAW     
protected  Info[] sourceLineInfo    source lines provided by this mixer 
protected  Info[] targetLineInfo    target lines provided by this mixer 
protected  Vector sourceLines    Source lines (ports) currently open 
protected  Vector targetLines    Target lines currently open. 
Fields inherited from com.sun.media.sound.AbstractLine:
info,  controls,  mixer
Constructor:
 protected AbstractMixer(Info mixerInfo,
    Control[] controls,
    Info[] sourceLineInfo,
    Info[] targetLineInfo) 
    Constructs a new AbstractMixer.
    Parameters:
    mixer - the mixer with which this line is associated
    controls - set of supported controls
Method from com.sun.media.sound.AbstractMixer Summary:
close,   close,   getLine,   getLineInfo,   getMaxLines,   getMixerInfo,   getSourceLineInfo,   getSourceLineInfo,   getSourceLines,   getTargetLineInfo,   getTargetLineInfo,   getTargetLines,   implClose,   implOpen,   implStart,   implStop,   isLineSupported,   isSourceLine,   isSynchronizationSupported,   isTargetLine,   open,   open,   open,   start,   stop,   synchronize,   unsynchronize
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.AbstractMixer Detail:
 public synchronized  void close() 
    Close all lines and then close this mixer.
 protected synchronized  void close(Line line) 
    Removes this line from the list of open source lines and open target lines, if it exists in either. If the list is now empty, closes the mixer.
 abstract public Line getLine(Info info) throws LineUnavailableException
 Info getLineInfo(Info info) 
    Returns the first complete Line.Info object it finds that matches the one specified, or null if no matching Line.Info object is found.
 abstract public int getMaxLines(Info info)
 public Info getMixerInfo() 
 public Info[] getSourceLineInfo() 
 public Info[] getSourceLineInfo(Info info) 
 public Line[] getSourceLines() 
 public Info[] getTargetLineInfo() 
 public Info[] getTargetLineInfo(Info info) 
 public Line[] getTargetLines() 
 abstract protected  void implClose()
 abstract protected  void implOpen() throws LineUnavailableException
 abstract protected  void implStart()
 abstract protected  void implStop()
 public boolean isLineSupported(Info info) 
 boolean isSourceLine(Info info) 
    Determines whether this is a source line for this mixer. Right now this just checks whether it's supported, but should check whether it actually belongs to this mixer....
 public boolean isSynchronizationSupported(Line[] lines,
    boolean maintainSync) 
    Default implementation always returns false.
 boolean isTargetLine(Info info) 
    Determines whether this is a target line for this mixer. Right now this just checks whether it's supported, but should check whether it actually belongs to this mixer....
 public synchronized  void open() throws LineUnavailableException 
    This implementation tries to open the mixer with its current format and buffer size settings.
 protected synchronized  void open(boolean manual) throws LineUnavailableException 
    This implementation tries to open the mixer with its current format and buffer size settings.
 protected synchronized  void open(Line line) throws LineUnavailableException 
    The default implementation of this method just determines whether this line is a source or target line, calls open(no-arg) on the mixer, and adds the line to the appropriate vector. The mixer may be opened at a format different than the line's format if it is a DataLine.
 protected synchronized  void start(Line line) 
    Starts the mixer.
 protected synchronized  void stop(Line line) 
    Stops the mixer if this was the last running line.
 public  void synchronize(Line[] lines,
    boolean maintainSync) 
    Default implementation always throws an exception.
 public  void unsynchronize(Line[] lines) 
    Default implementation always throws an exception.