APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.media.sound

public abstract Class SoftMixingDataLine

extends Object
implements DataLine
Class Inheritance
All Implemented Interfaces
javax.sound.sampled.DataLine, javax.sound.sampled.Line, java.lang.AutoCloseable
Known Direct Subclasses
com.sun.media.sound.SoftMixingSourceDataLine, com.sun.media.sound.SoftMixingClip
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .List, javax.sound.sampled.AudioFormat, .AudioSystem, .BooleanControl, .Control, .Control.Type, .DataLine, .FloatControl, .LineEvent, .LineListener

General software mixing line.
Author
Karl Helgason

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
protected static class
private class
private class
private class
private class
private class
private class

Field Summary

Modifier and TypeField and Description
private final SoftMixingDataLine.ApplyReverb
private final SoftMixingDataLine.Balance
public static final FloatControl.Type
private final SoftMixingDataLine.ChorusSend
pack-priv final Object
private final Control[]
pack-priv float
pack-priv float
private final SoftMixingDataLine.Gain
pack-priv DataLine.Info
pack-priv float
pack-priv List<LineListener>
pack-priv SoftMixingMixer
private final SoftMixingDataLine.Mute
private final SoftMixingDataLine.Pan
private final SoftMixingDataLine.ReverbSend
pack-priv float

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
addLineListener(LineListener listener)

Implements javax.sound.sampled.Line.addLineListener.

Adds a listener to this line.

pack-priv final void
public final Control
getControl(Control.Type control)

Implements javax.sound.sampled.Line.getControl.

Obtains a control of the specified type, if there is any.

public final Control[]
getControls()

Implements javax.sound.sampled.Line.getControls.

Obtains the set of controls associated with this line.

public final Line.Info
getLineInfo()

Implements javax.sound.sampled.Line.getLineInfo.

Obtains the Line.Info object describing this line.

public final boolean
isControlSupported(Control.Type control)

Implements javax.sound.sampled.Line.isControlSupported.

Indicates whether the line supports a control of the specified type.

protected abstract void
protected abstract void
public final void
removeLineListener(LineListener listener)

Implements javax.sound.sampled.Line.removeLineListener.

Removes the specified listener from this line's list of listeners.

pack-priv final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

apply_reverbback to summary
private final SoftMixingDataLine.ApplyReverb apply_reverb
balance_controlback to summary
private final SoftMixingDataLine.Balance balance_control
CHORUS_SENDback to summary
public static final FloatControl.Type CHORUS_SEND
chorussend_controlback to summary
private final SoftMixingDataLine.ChorusSend chorussend_control
control_mutexback to summary
pack-priv final Object control_mutex
controlsback to summary
private final Control[] controls
eff1gainback to summary
pack-priv float eff1gain
eff2gainback to summary
pack-priv float eff2gain
gain_controlback to summary
private final SoftMixingDataLine.Gain gain_control
infoback to summary
pack-priv DataLine.Info info
leftgainback to summary
pack-priv float leftgain
listenersback to summary
pack-priv List<LineListener> listeners
mixerback to summary
pack-priv SoftMixingMixer mixer
mute_controlback to summary
private final SoftMixingDataLine.Mute mute_control
pan_controlback to summary
private final SoftMixingDataLine.Pan pan_control
reverbsend_controlback to summary
private final SoftMixingDataLine.ReverbSend reverbsend_control
rightgainback to summary
pack-priv float rightgain

Constructor Detail

SoftMixingDataLineback to summary
pack-priv SoftMixingDataLine(SoftMixingMixer mixer, DataLine.Info info)

Method Detail

addLineListenerback to summary
public final void addLineListener(LineListener listener)

Implements javax.sound.sampled.Line.addLineListener.

Doc from javax.sound.sampled.Line.addLineListener.

Adds a listener to this line. Whenever the line's status changes, the listener's update() method is called with a LineEvent object that describes the change.

Annotations
@Override
calcVolumeback to summary
pack-priv final void calcVolume()
getControlback to summary
public final Control getControl(Control.Type control)

Implements javax.sound.sampled.Line.getControl.

Doc from javax.sound.sampled.Line.getControl.

Obtains a control of the specified type, if there is any. Some controls may only be available when the line is open.

Annotations
@Override
getControlsback to summary
public final Control[] getControls()

Implements javax.sound.sampled.Line.getControls.

Doc from javax.sound.sampled.Line.getControls.

Obtains the set of controls associated with this line. Some controls may only be available when the line is open. If there are no controls, this method returns an array of length 0.

Annotations
@Override
getLineInfoback to summary
public final Line.Info getLineInfo()

Implements javax.sound.sampled.Line.getLineInfo.

Doc from javax.sound.sampled.Line.getLineInfo.

Obtains the Line.Info object describing this line.

Annotations
@Override
isControlSupportedback to summary
public final boolean isControlSupported(Control.Type control)

Implements javax.sound.sampled.Line.isControlSupported.

Doc from javax.sound.sampled.Line.isControlSupported.

Indicates whether the line supports a control of the specified type. Some controls may only be available when the line is open.

Annotations
@Override
processAudioLogicback to summary
protected abstract void processAudioLogic(SoftAudioBuffer[] buffers)
processControlLogicback to summary
protected abstract void processControlLogic()
removeLineListenerback to summary
public final void removeLineListener(LineListener listener)

Implements javax.sound.sampled.Line.removeLineListener.

Doc from javax.sound.sampled.Line.removeLineListener.

Removes the specified listener from this line's list of listeners.

Annotations
@Override
sendEventback to summary
pack-priv final void sendEvent(LineEvent event)
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.ApplyReverb

extends BooleanControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setValue(boolean newValue)

Overrides javax.sound.sampled.BooleanControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.BooleanControl:
getStateLabelgetValuetoString

Constructor Detail

ApplyReverbback to summary
private ApplyReverb()

Method Detail

setValueback to summary
public void setValue(boolean newValue)

Overrides javax.sound.sampled.BooleanControl.setValue.

Doc from javax.sound.sampled.BooleanControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

protected final Class SoftMixingDataLine.AudioFloatInputStreamResampler

extends AudioFloatInputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final AudioFloatInputStream
private final int
private float[][]
private final float[][]
private final float[]
private float
private int
private final float[]
private float[][]
private float
private int
private int
private final int[]
private final int
private final int
private final float[]
private SoftAbstractResampler
private float[]
private final AudioFormat

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public void
public AudioFormat
public long
public void
mark(int readlimit)

Implements abstract com.sun.media.sound.AudioFloatInputStream.mark.

public boolean
public int
read(float[] b, int off, int len)

Implements abstract com.sun.media.sound.AudioFloatInputStream.read.

private void
public void
public long
Inherited from com.sun.media.sound.AudioFloatInputStream:
getInputStreamgetInputStreamgetInputStreamgetInputStreamgetInputStreamreadread

Field Detail

aisback to summary
private final AudioFloatInputStream ais
buffer_lenback to summary
private final int buffer_len
cbufferback to summary
private float[][] cbuffer
ibufferback to summary
private final float[][] ibuffer
ibuffer2back to summary
private final float[] ibuffer2
ibuffer_indexback to summary
private float ibuffer_index
ibuffer_lenback to summary
private int ibuffer_len
ixback to summary
private final float[] ix
mark_ibufferback to summary
private float[][] mark_ibuffer
mark_ibuffer_indexback to summary
private float mark_ibuffer_index
mark_ibuffer_lenback to summary
private int mark_ibuffer_len
nrofchannelsback to summary
private int nrofchannels
oxback to summary
private final int[] ox
padback to summary
private final int pad
pad2back to summary
private final int pad2
pitchback to summary
private final float[] pitch
resamplerback to summary
private SoftAbstractResampler resampler
skipbufferback to summary
private float[] skipbuffer
targetFormatback to summary
private final AudioFormat targetFormat

Constructor Detail

AudioFloatInputStreamResamplerback to summary
public AudioFloatInputStreamResampler(AudioFloatInputStream ais, AudioFormat format)

Method Detail

availableback to summary
public int available() throws IOException

Implements abstract com.sun.media.sound.AudioFloatInputStream.available.

Annotations
@Override
closeback to summary
public void close() throws IOException

Implements abstract com.sun.media.sound.AudioFloatInputStream.close.

Annotations
@Override
getFormatback to summary
public AudioFormat getFormat()

Implements abstract com.sun.media.sound.AudioFloatInputStream.getFormat.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements abstract com.sun.media.sound.AudioFloatInputStream.getFrameLength.

Annotations
@Override
markback to summary
public void mark(int readlimit)

Implements abstract com.sun.media.sound.AudioFloatInputStream.mark.

Annotations
@Override
markSupportedback to summary
public boolean markSupported()

Implements abstract com.sun.media.sound.AudioFloatInputStream.markSupported.

Annotations
@Override
readback to summary
public int read(float[] b, int off, int len) throws IOException

Implements abstract com.sun.media.sound.AudioFloatInputStream.read.

Annotations
@Override
readNextBufferback to summary
private void readNextBuffer() throws IOException
resetback to summary
public void reset() throws IOException

Implements abstract com.sun.media.sound.AudioFloatInputStream.reset.

Annotations
@Override
skipback to summary
public long skip(long len) throws IOException

Implements abstract com.sun.media.sound.AudioFloatInputStream.skip.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.Balance

extends FloatControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.FloatControl:
getMaximumgetMaxLabelgetMidLabelgetMinimumgetMinLabelgetPrecisiongetUnitsgetUpdatePeriodgetValueshifttoString

Constructor Detail

Balanceback to summary
private Balance()

Method Detail

setValueback to summary
public void setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Doc from javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.ChorusSend

extends FloatControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.FloatControl:
getMaximumgetMaxLabelgetMidLabelgetMinimumgetMinLabelgetPrecisiongetUnitsgetUpdatePeriodgetValueshifttoString

Constructor Detail

ChorusSendback to summary
private ChorusSend()

Method Detail

setValueback to summary
public void setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Doc from javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.Gain

extends FloatControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
Gain()

Method Summary

Modifier and TypeMethod and Description
public void
setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.FloatControl:
getMaximumgetMaxLabelgetMidLabelgetMinimumgetMinLabelgetPrecisiongetUnitsgetUpdatePeriodgetValueshifttoString

Constructor Detail

Gainback to summary
private Gain()

Method Detail

setValueback to summary
public void setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Doc from javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.Mute

extends BooleanControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
Mute()

Method Summary

Modifier and TypeMethod and Description
public void
setValue(boolean newValue)

Overrides javax.sound.sampled.BooleanControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.BooleanControl:
getStateLabelgetValuetoString

Constructor Detail

Muteback to summary
private Mute()

Method Detail

setValueback to summary
public void setValue(boolean newValue)

Overrides javax.sound.sampled.BooleanControl.setValue.

Doc from javax.sound.sampled.BooleanControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.Pan

extends FloatControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
Pan()

Method Summary

Modifier and TypeMethod and Description
public float
getValue()

Overrides javax.sound.sampled.FloatControl.getValue.

Obtains this control's current value.

public void
setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.FloatControl:
getMaximumgetMaxLabelgetMidLabelgetMinimumgetMinLabelgetPrecisiongetUnitsgetUpdatePeriodshifttoString

Constructor Detail

Panback to summary
private Pan()

Method Detail

getValueback to summary
public float getValue()

Overrides javax.sound.sampled.FloatControl.getValue.

Doc from javax.sound.sampled.FloatControl.getValue.

Obtains this control's current value.

Annotations
@Override
setValueback to summary
public void setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Doc from javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override
com.sun.media.sound back to summary

private final Class SoftMixingDataLine.ReverbSend

extends FloatControl
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control.

Inherited from javax.sound.sampled.FloatControl:
getMaximumgetMaxLabelgetMidLabelgetMinimumgetMinLabelgetPrecisiongetUnitsgetUpdatePeriodgetValueshifttoString

Constructor Detail

ReverbSendback to summary
private ReverbSend()

Method Detail

setValueback to summary
public void setValue(float newValue)

Overrides javax.sound.sampled.FloatControl.setValue.

Doc from javax.sound.sampled.FloatControl.setValue.

Sets the current value for the control. The default implementation simply sets the value as indicated. If the value indicated is greater than the maximum value, or smaller than the minimum value, an IllegalArgumentException is thrown. Some controls require that their line be open before they can be affected by setting a value.

Annotations
@Override