Top Inners Fields Constructors Methods
com.jogamp.audio.windows.waveout

public Class Mixer

extends Object
Class Inheritance
Imports
java.io.*, java.nio.*, java.util.*, com.jogamp.common.util.InterruptSource, .InterruptedRuntimeException, java.lang.reflect.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private static Map<K, V>
private static Class<T>
private static Constructor<T>
private final long
private float
pack-priv volatile boolean
private final Vec3f
private static Mixer
pack-priv volatile boolean
private final Vec3f
pack-priv volatile boolean
pack-priv volatile Object
private volatile ArrayList<Track>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv synchronized void
add(final Track track)

private static native void
CloseHandle(long handle)

private static native long
public static Mixer
private static native ByteBuffer
getMixerBufferData(long mixerBuffer)

private static native long
getMixerBufferDataAddress(long mixerBuffer)

private static native int
getMixerBufferDataCapacity(long mixerBuffer)

private static native long
private static native boolean
initializeWaveOut(long eventObject)

private static ByteBuffer
newDirectByteBuffer(final long address, final long capacity)

private static ByteBuffer
newDirectByteBufferImpl(final long address, final long capacity)

private static native boolean
prepareMixerBuffer(long mixerBuffer)

pack-priv synchronized void
remove(final Track track)

private static native void
SetEvent(long event)

public void
setFalloffFactor(final float factor)

This defines a scale factor of sorts -- the higher the number, the larger an area the sound will affect.

public void
setLeftSpeakerPosition(final float x, final float y, final float z)

public void
setRightSpeakerPosition(final float x, final float y, final float z)

public void
private static native void
private static native boolean
WaitForSingleObject(long event)

private static native boolean
writeMixerBuffer(long mixerBuffer)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

createdBuffersback to summary
private static Map<K, V> createdBuffers
directByteBufferClassback to summary
private static Class<T> directByteBufferClass
directByteBufferConstructorback to summary
private static Constructor<T> directByteBufferConstructor
eventback to summary
private final long event
falloffFactorback to summary
private float falloffFactor
fillerAliveback to summary
pack-priv volatile boolean fillerAlive
leftSpeakerPositionback to summary
private final Vec3f leftSpeakerPosition
mixerback to summary
private static Mixer mixer
mixerAliveback to summary
pack-priv volatile boolean mixerAlive
rightSpeakerPositionback to summary
private final Vec3f rightSpeakerPosition
shutdownback to summary
pack-priv volatile boolean shutdown
shutdownLockback to summary
pack-priv volatile Object shutdownLock
tracksback to summary
private volatile ArrayList<Track> tracks

Constructor Detail

Mixerback to summary
private Mixer()

Method Detail

addback to summary
pack-priv synchronized void add(final Track track)
CloseHandleback to summary
private static native void CloseHandle(long handle)
CreateEventback to summary
private static native long CreateEvent()
getMixerback to summary
public static Mixer getMixer()
getMixerBufferDataback to summary
private static native ByteBuffer getMixerBufferData(long mixerBuffer)
getMixerBufferDataAddressback to summary
private static native long getMixerBufferDataAddress(long mixerBuffer)
getMixerBufferDataCapacityback to summary
private static native int getMixerBufferDataCapacity(long mixerBuffer)
getNextMixerBufferback to summary
private static native long getNextMixerBuffer()
initializeWaveOutback to summary
private static native boolean initializeWaveOut(long eventObject)
newDirectByteBufferback to summary
private static ByteBuffer newDirectByteBuffer(final long address, final long capacity)
newDirectByteBufferImplback to summary
private static ByteBuffer newDirectByteBufferImpl(final long address, final long capacity)
prepareMixerBufferback to summary
private static native boolean prepareMixerBuffer(long mixerBuffer)
removeback to summary
pack-priv synchronized void remove(final Track track)
SetEventback to summary
private static native void SetEvent(long event)
setFalloffFactorback to summary
public void setFalloffFactor(final float factor)

This defines a scale factor of sorts -- the higher the number, the larger an area the sound will affect. Default value is 1.0f. Valid values are [1.0f, ...]. The formula for the gain for each channel is

     falloffFactor
  -------------------
  falloffFactor + r^2
setLeftSpeakerPositionback to summary
public void setLeftSpeakerPosition(final float x, final float y, final float z)
setRightSpeakerPositionback to summary
public void setRightSpeakerPosition(final float x, final float y, final float z)
shutdownback to summary
public void shutdown()
shutdownWaveOutback to summary
private static native void shutdownWaveOut()
WaitForSingleObjectback to summary
private static native boolean WaitForSingleObject(long event)
writeMixerBufferback to summary
private static native boolean writeMixerBuffer(long mixerBuffer)
com.jogamp.audio.windows.waveout back to summary

pack-priv Class Mixer.FillerThread

extends Thread
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.
Inherited from com.jogamp.common.util.InterruptSource.Thread:
clearInterruptSourcecreategetInterruptCountergetInterruptSourceinterrupt

Constructor Detail

FillerThreadback to summary
pack-priv FillerThread()

Method Detail

runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.

Annotations
@Override
com.jogamp.audio.windows.waveout back to summary

pack-priv Class Mixer.MixerThread

extends Thread
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv float[]
private final Vec3f

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private float
gain(final Vec3f pos, final Vec3f speakerPos)

public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.
Inherited from com.jogamp.common.util.InterruptSource.Thread:
clearInterruptSourcecreategetInterruptCountergetInterruptSourceinterrupt

Field Detail

mixingBufferback to summary
pack-priv float[] mixingBuffer
tempback to summary
private final Vec3f temp

Constructor Detail

MixerThreadback to summary
pack-priv MixerThread()

Method Detail

gainback to summary
private float gain(final Vec3f pos, final Vec3f speakerPos)
runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.

Annotations
@Override