org.tritonus.share.sampled.mixer
Class TMixer

java.lang.Object
  extended byorg.tritonus.share.sampled.mixer.TLine
      extended byorg.tritonus.share.sampled.mixer.TMixer
All Implemented Interfaces:
Line, Mixer
Direct Known Subclasses:
AlsaDataLineMixer, AlsaPortMixer, EsdMixer

public abstract class TMixer
extends TLine
implements Mixer


Nested Class Summary
 
Nested classes inherited from class javax.sound.sampled.Mixer
Mixer.Info
 
Constructor Summary
protected TMixer(Mixer.Info mixerInfo, Line.Info lineInfo)
          Constructor for mixers that use setSupportInformation().
protected TMixer(Mixer.Info mixerInfo, Line.Info lineInfo, Collection supportedSourceFormats, Collection supportedTargetFormats, Collection supportedSourceLineInfos, Collection supportedTargetLineInfos)
          Constructor for mixers.
 
Method Summary
protected  Clip getClip(AudioFormat format)
           
 Line getLine(Line.Info info)
           
 Mixer.Info getMixerInfo()
           
protected  Port getPort(Port.Info info)
           
protected  SourceDataLine getSourceDataLine(AudioFormat format, int nBufferSize)
           
 Line.Info[] getSourceLineInfo()
           
 Line.Info[] getSourceLineInfo(Line.Info info)
           
 Line[] getSourceLines()
           
protected  TargetDataLine getTargetDataLine(AudioFormat format, int nBufferSize)
           
 Line.Info[] getTargetLineInfo()
           
 Line.Info[] getTargetLineInfo(Line.Info info)
           
 Line[] getTargetLines()
           
 boolean isLineSupported(Line.Info info)
           
protected  boolean isSourceFormatSupported(AudioFormat format)
           
 boolean isSynchronizationSupported(Line[] aLines, boolean bMaintainSync)
           
protected  boolean isTargetFormatSupported(AudioFormat format)
           
(package private)  void registerOpenLine(Line line)
           
protected  void setSupportInformation(Collection supportedSourceFormats, Collection supportedTargetFormats, Collection supportedSourceLineInfos, Collection supportedTargetLineInfos)
           
 void synchronize(Line[] aLines, boolean bMaintainSync)
           
(package private)  void unregisterOpenLine(Line line)
           
 void unsynchronize(Line[] aLines)
           
 
Methods inherited from class org.tritonus.share.sampled.mixer.TLine
addControl, addLineListener, close, closeImpl, getControl, getControls, getLineInfo, getMixer, isControlSupported, isOpen, notifyLineEvent, 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.Mixer
getMaxLines
 
Methods inherited from interface javax.sound.sampled.Line
addLineListener, close, getControl, getControls, getLineInfo, isControlSupported, isOpen, open, removeLineListener
 

Constructor Detail

TMixer

protected TMixer(Mixer.Info mixerInfo,
                 Line.Info lineInfo)
Constructor for mixers that use setSupportInformation().


TMixer

protected TMixer(Mixer.Info mixerInfo,
                 Line.Info lineInfo,
                 Collection supportedSourceFormats,
                 Collection supportedTargetFormats,
                 Collection supportedSourceLineInfos,
                 Collection supportedTargetLineInfos)
Constructor for mixers.

Method Detail

setSupportInformation

protected void setSupportInformation(Collection supportedSourceFormats,
                                     Collection supportedTargetFormats,
                                     Collection supportedSourceLineInfos,
                                     Collection supportedTargetLineInfos)

getMixerInfo

public Mixer.Info getMixerInfo()
Specified by:
getMixerInfo in interface Mixer

getSourceLineInfo

public Line.Info[] getSourceLineInfo()
Specified by:
getSourceLineInfo in interface Mixer

getTargetLineInfo

public Line.Info[] getTargetLineInfo()
Specified by:
getTargetLineInfo in interface Mixer

getSourceLineInfo

public Line.Info[] getSourceLineInfo(Line.Info info)
Specified by:
getSourceLineInfo in interface Mixer

getTargetLineInfo

public Line.Info[] getTargetLineInfo(Line.Info info)
Specified by:
getTargetLineInfo in interface Mixer

isLineSupported

public boolean isLineSupported(Line.Info info)
Specified by:
isLineSupported in interface Mixer

getLine

public Line getLine(Line.Info info)
             throws LineUnavailableException
Specified by:
getLine in interface Mixer
Throws:
LineUnavailableException

getSourceDataLine

protected SourceDataLine getSourceDataLine(AudioFormat format,
                                           int nBufferSize)
                                    throws LineUnavailableException
Throws:
LineUnavailableException

getClip

protected Clip getClip(AudioFormat format)
                throws LineUnavailableException
Throws:
LineUnavailableException

getTargetDataLine

protected TargetDataLine getTargetDataLine(AudioFormat format,
                                           int nBufferSize)
                                    throws LineUnavailableException
Throws:
LineUnavailableException

getPort

protected Port getPort(Port.Info info)
                throws LineUnavailableException
Throws:
LineUnavailableException

getSourceLines

public Line[] getSourceLines()
Specified by:
getSourceLines in interface Mixer

getTargetLines

public Line[] getTargetLines()
Specified by:
getTargetLines in interface Mixer

synchronize

public void synchronize(Line[] aLines,
                        boolean bMaintainSync)
Specified by:
synchronize in interface Mixer

unsynchronize

public void unsynchronize(Line[] aLines)
Specified by:
unsynchronize in interface Mixer

isSynchronizationSupported

public boolean isSynchronizationSupported(Line[] aLines,
                                          boolean bMaintainSync)
Specified by:
isSynchronizationSupported in interface Mixer

isSourceFormatSupported

protected boolean isSourceFormatSupported(AudioFormat format)

isTargetFormatSupported

protected boolean isTargetFormatSupported(AudioFormat format)

registerOpenLine

void registerOpenLine(Line line)

unregisterOpenLine

void unregisterOpenLine(Line line)