com.sun.media.sound
Class SoftMixingDataLine

java.lang.Object
  extended by com.sun.media.sound.SoftMixingDataLine
All Implemented Interfaces:
javax.sound.sampled.DataLine, javax.sound.sampled.Line
Direct Known Subclasses:
SoftMixingClip, SoftMixingSourceDataLine

public abstract class SoftMixingDataLine
extends java.lang.Object
implements javax.sound.sampled.DataLine

General software mixing line.

Author:
Karl Helgason

Nested Class Summary
protected static class SoftMixingDataLine.AudioFloatInputStreamResampler
           
 
Nested classes/interfaces inherited from interface javax.sound.sampled.DataLine
javax.sound.sampled.DataLine.Info
 
Field Summary
static javax.sound.sampled.FloatControl.Type CHORUS_SEND
           
protected  java.lang.Object control_mutex
           
protected  float eff1gain
           
protected  float eff2gain
           
protected  javax.sound.sampled.DataLine.Info info
           
protected  float leftgain
           
protected  java.util.List<javax.sound.sampled.LineListener> listeners
           
protected  SoftMixingMixer mixer
           
protected  float rightgain
           
 
Constructor Summary
protected SoftMixingDataLine(SoftMixingMixer mixer, javax.sound.sampled.DataLine.Info info)
           
 
Method Summary
 void addLineListener(javax.sound.sampled.LineListener listener)
           
protected  void calcVolume()
           
 javax.sound.sampled.Control getControl(javax.sound.sampled.Control.Type control)
           
 javax.sound.sampled.Control[] getControls()
           
 javax.sound.sampled.Line.Info getLineInfo()
           
 boolean isControlSupported(javax.sound.sampled.Control.Type control)
           
protected abstract  void processAudioLogic(SoftAudioBuffer[] buffers)
           
protected abstract  void processControlLogic()
           
 void removeLineListener(javax.sound.sampled.LineListener listener)
           
protected  void sendEvent(javax.sound.sampled.LineEvent event)
           
 
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, getBufferSize, getFormat, getFramePosition, getLevel, getLongFramePosition, getMicrosecondPosition, isActive, isRunning, start, stop
 
Methods inherited from interface javax.sound.sampled.Line
close, isOpen, open
 

Field Detail

CHORUS_SEND

public static final javax.sound.sampled.FloatControl.Type CHORUS_SEND

leftgain

protected float leftgain

rightgain

protected float rightgain

eff1gain

protected float eff1gain

eff2gain

protected float eff2gain

listeners

protected java.util.List<javax.sound.sampled.LineListener> listeners

control_mutex

protected java.lang.Object control_mutex

mixer

protected SoftMixingMixer mixer

info

protected javax.sound.sampled.DataLine.Info info
Constructor Detail

SoftMixingDataLine

protected SoftMixingDataLine(SoftMixingMixer mixer,
                             javax.sound.sampled.DataLine.Info info)
Method Detail

processControlLogic

protected abstract void processControlLogic()

processAudioLogic

protected abstract void processAudioLogic(SoftAudioBuffer[] buffers)

calcVolume

protected void calcVolume()

sendEvent

protected void sendEvent(javax.sound.sampled.LineEvent event)

addLineListener

public void addLineListener(javax.sound.sampled.LineListener listener)
Specified by:
addLineListener in interface javax.sound.sampled.Line

removeLineListener

public void removeLineListener(javax.sound.sampled.LineListener listener)
Specified by:
removeLineListener in interface javax.sound.sampled.Line

getLineInfo

public javax.sound.sampled.Line.Info getLineInfo()
Specified by:
getLineInfo in interface javax.sound.sampled.Line

getControl

public javax.sound.sampled.Control getControl(javax.sound.sampled.Control.Type control)
Specified by:
getControl in interface javax.sound.sampled.Line

getControls

public javax.sound.sampled.Control[] getControls()
Specified by:
getControls in interface javax.sound.sampled.Line

isControlSupported

public boolean isControlSupported(javax.sound.sampled.Control.Type control)
Specified by:
isControlSupported in interface javax.sound.sampled.Line