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

pack-priv final Class DirectAudioDevice

extends AbstractMixer
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, java.util.Vector, javax.sound.sampled.AudioFormat, .AudioInputStream, .AudioSystem, .BooleanControl, .Clip, .Control, .DataLine, .FloatControl, .Line, .LineUnavailableException, .SourceDataLine, .TargetDataLine

A Mixer which provides direct access to audio devices.
Author
Florian Bomers

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
DirectAudioDevice.DirectClip

Private inner class representing a Clip This clip is realized in software only

private static class
DirectAudioDevice.DirectDL

Private inner class as base class for direct lines.

private static class
DirectAudioDevice.DirectDLI

Private inner class for the DataLine.Info objects adds a little magic for the isFormatSupported so that the automagic conversion of endianness and sign does not show up in the formats array.

private static class
DirectAudioDevice.DirectSDL

Private inner class representing a SourceDataLine.

private static class
DirectAudioDevice.DirectTDL

Private inner class representing a TargetDataLine.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
Inherited from com.sun.media.sound.AbstractMixer:
ALAWPCMsourceLineInfotargetLineInfoULAW

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static void
addFormat(Vector<AudioFormat> v, int bits, int frameSizeInBytes, int channels, float sampleRate, int encoding, boolean signed, boolean bigEndian)

private DirectAudioDevice.DirectDLI
createDataLineInfo(boolean isSource)

pack-priv int
public Line
getLine(Line.Info info)

Implements abstract com.sun.media.sound.AbstractMixer.getLine.

Implements javax.sound.sampled.Mixer.getLine.

Obtains a line that is available for use and that matches the description in the specified Line.Info object.

public int
getMaxLines(Line.Info info)

Implements abstract com.sun.media.sound.AbstractMixer.getMaxLines.

Implements javax.sound.sampled.Mixer.getMaxLines.

Obtains the approximate maximum number of lines of the requested type that can be open simultaneously on the mixer.

pack-priv int
pack-priv int
protected static AudioFormat
protected void
protected void
protected void
protected void
private static native void
nClose(long id, boolean isSource)

private static native void
nFlush(long id, boolean isSource)

private static native int
nGetBufferSize(long id, boolean isSource)

private static native long
nGetBytePosition(long id, boolean isSource, long javaPos)

private static native void
nGetFormats(int mixerIndex, int deviceID, boolean isSource, Vector<E> formats)

private static native boolean
nIsStillDraining(long id, boolean isSource)

private static native long
nOpen(int mixerIndex, int deviceID, boolean isSource, int encoding, float sampleRate, int sampleSizeInBits, int frameSize, int channels, boolean signed, boolean bigEndian, int bufferSize)

private static native int
nRead(long id, byte[] b, int off, int len, int conversionSize)

private static native boolean
nRequiresServicing(long id, boolean isSource)

private static native void
nService(long id, boolean isSource)

private static native void
nSetBytePosition(long id, boolean isSource, long pos)

private static native void
nStart(long id, boolean isSource)

private static native void
nStop(long id, boolean isSource)

private static native int
nWrite(long id, byte[] b, int off, int len, int conversionSize, float volLeft, float volRight)

Inherited from com.sun.media.sound.AbstractMixer:
closeclosegetLineInfogetMixerInfogetSourceLineInfogetSourceLineInfogetSourceLinesgetTargetLineInfogetTargetLineInfogetTargetLinesisLineSupportedisSourceLineisSynchronizationSupportedisTargetLineopenopenopenstartstopsynchronizeunsynchronize