com.sun.media.sound
Class SoftMixingClip

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

public class SoftMixingClip
extends SoftMixingDataLine
implements javax.sound.sampled.Clip

Clip implemention for the SoftMixingMixer.

Author:
Karl Helgason

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.media.sound.SoftMixingDataLine
SoftMixingDataLine.AudioFloatInputStreamResampler
 
Nested classes/interfaces inherited from interface javax.sound.sampled.DataLine
javax.sound.sampled.DataLine.Info
 
Field Summary
 
Fields inherited from class com.sun.media.sound.SoftMixingDataLine
CHORUS_SEND, control_mutex, eff1gain, eff2gain, info, leftgain, listeners, mixer, rightgain
 
Fields inherited from interface javax.sound.sampled.Clip
LOOP_CONTINUOUSLY
 
Constructor Summary
protected SoftMixingClip(SoftMixingMixer mixer, javax.sound.sampled.DataLine.Info info)
           
 
Method Summary
 int available()
           
 void close()
           
 void drain()
           
 void flush()
           
 int getBufferSize()
           
 javax.sound.sampled.AudioFormat getFormat()
           
 int getFrameLength()
           
 int getFramePosition()
           
 float getLevel()
           
 long getLongFramePosition()
           
 long getMicrosecondLength()
           
 long getMicrosecondPosition()
           
 boolean isActive()
           
 boolean isOpen()
           
 boolean isRunning()
           
 void loop(int count)
           
 void open()
           
 void open(javax.sound.sampled.AudioFormat format, byte[] data, int offset, int bufferSize)
           
 void open(javax.sound.sampled.AudioInputStream stream)
           
protected  void processAudioLogic(SoftAudioBuffer[] buffers)
           
protected  void processControlLogic()
           
 void setFramePosition(int frames)
           
 void setLoopPoints(int start, int end)
           
 void setMicrosecondPosition(long microseconds)
           
 void start()
           
 void stop()
           
 
Methods inherited from class com.sun.media.sound.SoftMixingDataLine
addLineListener, calcVolume, getControl, getControls, getLineInfo, isControlSupported, removeLineListener, sendEvent
 
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.Line
addLineListener, getControl, getControls, getLineInfo, isControlSupported, removeLineListener
 

Constructor Detail

SoftMixingClip

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

processControlLogic

protected void processControlLogic()
Specified by:
processControlLogic in class SoftMixingDataLine

processAudioLogic

protected void processAudioLogic(SoftAudioBuffer[] buffers)
Specified by:
processAudioLogic in class SoftMixingDataLine

getFrameLength

public int getFrameLength()
Specified by:
getFrameLength in interface javax.sound.sampled.Clip

getMicrosecondLength

public long getMicrosecondLength()
Specified by:
getMicrosecondLength in interface javax.sound.sampled.Clip

loop

public void loop(int count)
Specified by:
loop in interface javax.sound.sampled.Clip

open

public void open(javax.sound.sampled.AudioInputStream stream)
          throws javax.sound.sampled.LineUnavailableException,
                 java.io.IOException
Specified by:
open in interface javax.sound.sampled.Clip
Throws:
javax.sound.sampled.LineUnavailableException
java.io.IOException

open

public void open(javax.sound.sampled.AudioFormat format,
                 byte[] data,
                 int offset,
                 int bufferSize)
          throws javax.sound.sampled.LineUnavailableException
Specified by:
open in interface javax.sound.sampled.Clip
Throws:
javax.sound.sampled.LineUnavailableException

setFramePosition

public void setFramePosition(int frames)
Specified by:
setFramePosition in interface javax.sound.sampled.Clip

setLoopPoints

public void setLoopPoints(int start,
                          int end)
Specified by:
setLoopPoints in interface javax.sound.sampled.Clip

setMicrosecondPosition

public void setMicrosecondPosition(long microseconds)
Specified by:
setMicrosecondPosition in interface javax.sound.sampled.Clip

available

public int available()
Specified by:
available in interface javax.sound.sampled.DataLine

drain

public void drain()
Specified by:
drain in interface javax.sound.sampled.DataLine

flush

public void flush()
Specified by:
flush in interface javax.sound.sampled.DataLine

getBufferSize

public int getBufferSize()
Specified by:
getBufferSize in interface javax.sound.sampled.DataLine

getFormat

public javax.sound.sampled.AudioFormat getFormat()
Specified by:
getFormat in interface javax.sound.sampled.DataLine

getFramePosition

public int getFramePosition()
Specified by:
getFramePosition in interface javax.sound.sampled.DataLine

getLevel

public float getLevel()
Specified by:
getLevel in interface javax.sound.sampled.DataLine

getLongFramePosition

public long getLongFramePosition()
Specified by:
getLongFramePosition in interface javax.sound.sampled.DataLine

getMicrosecondPosition

public long getMicrosecondPosition()
Specified by:
getMicrosecondPosition in interface javax.sound.sampled.DataLine

isActive

public boolean isActive()
Specified by:
isActive in interface javax.sound.sampled.DataLine

isRunning

public boolean isRunning()
Specified by:
isRunning in interface javax.sound.sampled.DataLine

start

public void start()
Specified by:
start in interface javax.sound.sampled.DataLine

stop

public void stop()
Specified by:
stop in interface javax.sound.sampled.DataLine

close

public void close()
Specified by:
close in interface javax.sound.sampled.Line

isOpen

public boolean isOpen()
Specified by:
isOpen in interface javax.sound.sampled.Line

open

public void open()
          throws javax.sound.sampled.LineUnavailableException
Specified by:
open in interface javax.sound.sampled.Line
Throws:
javax.sound.sampled.LineUnavailableException