Top Description Fields Constructors Methods
org.lwjgl.openal

public Class SOFTSourceLatency

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the SOFT_source_latency extension.

This extension provides a method for applications to more accurately measure the playback latency of sources. Unextended OpenAL allows apps to retrieve a source's playback offset in bytes, samples, or seconds, but this is (typically) where the AL is processing the audio data.

Often, more processing is done outside of the AL. Audio servers are common and they can introduce a bit of latency, increasing the time between when the AL is done with a piece of audio data until it gets heard by the user. If the OpenAL implementation uses its own mixer, that can also add to the latency. This can ultimately cause a not-insignificant delay between where the AL is processing and what is actually being heard.

Although this delay may not be very noticeable for general gaming, if the app is trying to keep a video or animation syncronized with the playback of an OpenAL source this extra delay can cause the audio and video to appear of out sync.

Luckily, most audio systems have a way of measuring the latency it takes for sound to actually get to the physical output device (the DAC or speakers). By providing this information through the AL, an application can more accurately tell what a user is hearing and thus synchronize better with the audio output.

Field Summary

Modifier and TypeField and Description
public static final int
AL_SAMPLE_OFFSET_LATENCY_SOFT

The playback position, expressed in fixed-point samples, along with the playback latency, expressed in nanoseconds (1/1000000000ths of a second).

public static final int
AL_SEC_OFFSET_LATENCY_SOFT

The playback position, along with the playback latency, both expressed in seconds.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
alGetSource3dSOFT(int
the source to query
source
,
int
the parameter to query
param
,
DoubleBuffer
the first value
value1
,
DoubleBuffer
the second value
value2
,
DoubleBuffer
the third value
value3
)

Gets the 3 dimensional double values of a source parameter.

public static void
alGetSource3dSOFT(int source, int param, double[] value1, double[] value2, double[] value3)

Array version of: GetSource3dSOFT

public static void
alGetSource3i64SOFT(int
the source to query
source
,
int
the parameter to query
param
,
LongBuffer
the first value
value1
,
LongBuffer
the second value
value2
,
LongBuffer
the third value
value3
)

Gets the 3 dimensional 64 bit integer values of a source parameter.

public static void
alGetSource3i64SOFT(int source, int param, long[] value1, long[] value2, long[] value3)

Array version of: GetSource3i64SOFT

public static void
alGetSourcedSOFT(int
the source to query
source
,
int
the parameter to query
param
,
DoubleBuffer
the parameter values
value
)

Gets the double value of a source parameter.

public static double
alGetSourcedSOFT(int
the source to query
source
,
int
the parameter to query
param
)

Gets the double value of a source parameter.

public static void
alGetSourcedSOFT(int source, int param, double[] value)

Array version of: GetSourcedSOFT

public static void
alGetSourcedvSOFT(int
the source to query
source
,
int
the parameter to query
param
,
DoubleBuffer
the parameter values
values
)

Array version of GetSourcedSOFT

public static void
alGetSourcedvSOFT(int source, int param, double[] values)

Array version of: GetSourcedvSOFT

public static void
alGetSourcei64SOFT(int
the source to query
source
,
int
the parameter to query
param
,
LongBuffer
the parameter values
value
)

Gets the 64 bit integer value of a source parameter.

public static long
alGetSourcei64SOFT(int
the source to query
source
,
int
the parameter to query
param
)

Gets the 64 bit integer value of a source parameter.

public static void
alGetSourcei64SOFT(int source, int param, long[] value)

Array version of: GetSourcei64SOFT

public static void
alGetSourcei64vSOFT(int
the source to query
source
,
int
the parameter to query
param
,
LongBuffer
the parameter values
values
)

Array version of GetSourcei64SOFT

public static void
alGetSourcei64vSOFT(int source, int param, long[] values)

Array version of: GetSourcei64vSOFT

public static void
alSource3dSOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
double
the first value
value1
,
double
the second value
value2
,
double
the third value
value3
)

Sets the 3 dimensional double values of a source parameter.

public static void
alSource3i64SOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
long
the first value
value1
,
long
the second value
value2
,
long
the third value
value3
)

Sets the 3 dimensional 64 bit integer values of a source parameter.

public static void
alSourcedSOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
double
the parameter value
value
)

Sets the double value of a source parameter.

public static void
alSourcedvSOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
DoubleBuffer
the parameter values
value
)

pointer version of SourcedSOFT

public static void
alSourcedvSOFT(int source, int param, double[] value)

Array version of: SourcedvSOFT

public static void
alSourcei64SOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
long
the parameter values
value
)

Sets the 64 bit integer value of a source parameter.

public static void
alSourcei64vSOFT(int
the source to modify
source
,
int
the parameter to modify
param
,
LongBuffer
the parameter values
values
)

Array version of Sourcei64SOFT

public static void
alSourcei64vSOFT(int source, int param, long[] values)

Array version of: Sourcei64vSOFT

public static void
nalGetSource3dSOFT(int source, int param, long value1, long value2, long value3)

Unsafe version of: GetSource3dSOFT

public static void
nalGetSource3i64SOFT(int source, int param, long value1, long value2, long value3)

Unsafe version of: GetSource3i64SOFT

public static void
nalGetSourcedSOFT(int source, int param, long value)

Unsafe version of: GetSourcedSOFT

public static void
nalGetSourcedvSOFT(int source, int param, long values)

Unsafe version of: GetSourcedvSOFT

public static void
nalGetSourcei64SOFT(int source, int param, long value)

Unsafe version of: GetSourcei64SOFT

public static void
nalGetSourcei64vSOFT(int source, int param, long values)

Unsafe version of: GetSourcei64vSOFT

public static void
nalSourcedvSOFT(int source, int param, long value)

Unsafe version of: SourcedvSOFT

public static void
nalSourcei64vSOFT(int source, int param, long values)

Unsafe version of: Sourcei64vSOFT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AL_SAMPLE_OFFSET_LATENCY_SOFTback to summary
public static final int AL_SAMPLE_OFFSET_LATENCY_SOFT

The playback position, expressed in fixed-point samples, along with the playback latency, expressed in nanoseconds (1/1000000000ths of a second). This attribute is read-only.

The first value in the returned vector is the sample offset, which is a 32.32 fixed-point value. The whole number is stored in the upper 32 bits and the fractional component is in the lower 32 bits. The value is similar to that returned by SAMPLE_OFFSET, just with more precision.

The second value is the latency, in nanoseconds. It represents the length of time it will take for the audio at the current offset to actually reach the speakers or DAC. This value should be considered volatile, as it may change very often during playback (it can depend on a number of factors, including how full the mixing buffer OpenAL may be using is timer jitter, or other changes deeper in the audio pipeline).

The retrieved offset and latency should be considered atomic, with respect to one another. This means the returned latency was measured exactly when the source was at the returned offset.

AL_SEC_OFFSET_LATENCY_SOFTback to summary
public static final int AL_SEC_OFFSET_LATENCY_SOFT

The playback position, along with the playback latency, both expressed in seconds. This attribute is read-only.

The first value in the returned vector is the offset in seconds. The value is similar to that returned by SEC_OFFSET, just with more precision.

The second value is the latency, in seconds. It represents the length of time it will take for the audio at the current offset to actually reach the speakers or DAC. This value should be considered volatile, as it may change very often during playback (it can depend on a number of factors, including how full the mixing buffer OpenAL may be using is, timer jitter, or other changes deeper in the audio pipeline).

The retrieved offset and latency should be considered atomic with respect to one another. This means the returned latency was measured exactly when the source was at the returned offset.

Constructor Detail

SOFTSourceLatencyback to summary
protected SOFTSourceLatency()

Method Detail

alGetSource3dSOFTback to summary
public static void alGetSource3dSOFT(int source, int param, DoubleBuffer value1, DoubleBuffer value2, DoubleBuffer value3)

Gets the 3 dimensional double values of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

value1:DoubleBuffer

the first value

value2:DoubleBuffer

the second value

value3:DoubleBuffer

the third value

Annotations
@NativeType:ALvoid
alGetSource3dSOFTback to summary
public static void alGetSource3dSOFT(int source, int param, double[] value1, double[] value2, double[] value3)

Array version of: GetSource3dSOFT

Annotations
@NativeType:ALvoid
alGetSource3i64SOFTback to summary
public static void alGetSource3i64SOFT(int source, int param, LongBuffer value1, LongBuffer value2, LongBuffer value3)

Gets the 3 dimensional 64 bit integer values of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

value1:LongBuffer

the first value

value2:LongBuffer

the second value

value3:LongBuffer

the third value

Annotations
@NativeType:ALvoid
alGetSource3i64SOFTback to summary
public static void alGetSource3i64SOFT(int source, int param, long[] value1, long[] value2, long[] value3)

Array version of: GetSource3i64SOFT

Annotations
@NativeType:ALvoid
alGetSourcedSOFTback to summary
public static void alGetSourcedSOFT(int source, int param, DoubleBuffer value)

Gets the double value of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

value:DoubleBuffer

the parameter values

Annotations
@NativeType:ALvoid
alGetSourcedSOFTback to summary
public static double alGetSourcedSOFT(int source, int param)

Gets the double value of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

Annotations
@NativeType:ALvoid
alGetSourcedSOFTback to summary
public static void alGetSourcedSOFT(int source, int param, double[] value)

Array version of: GetSourcedSOFT

Annotations
@NativeType:ALvoid
alGetSourcedvSOFTback to summary
public static void alGetSourcedvSOFT(int source, int param, DoubleBuffer values)

Array version of GetSourcedSOFT

Parameters
source:int

the source to query

param:int

the parameter to query

values:DoubleBuffer

the parameter values

Annotations
@NativeType:ALvoid
alGetSourcedvSOFTback to summary
public static void alGetSourcedvSOFT(int source, int param, double[] values)

Array version of: GetSourcedvSOFT

Annotations
@NativeType:ALvoid
alGetSourcei64SOFTback to summary
public static void alGetSourcei64SOFT(int source, int param, LongBuffer value)

Gets the 64 bit integer value of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

value:LongBuffer

the parameter values

Annotations
@NativeType:ALvoid
alGetSourcei64SOFTback to summary
public static long alGetSourcei64SOFT(int source, int param)

Gets the 64 bit integer value of a source parameter.

Parameters
source:int

the source to query

param:int

the parameter to query

Annotations
@NativeType:ALvoid
alGetSourcei64SOFTback to summary
public static void alGetSourcei64SOFT(int source, int param, long[] value)

Array version of: GetSourcei64SOFT

Annotations
@NativeType:ALvoid
alGetSourcei64vSOFTback to summary
public static void alGetSourcei64vSOFT(int source, int param, LongBuffer values)

Array version of GetSourcei64SOFT

Parameters
source:int

the source to query

param:int

the parameter to query

values:LongBuffer

the parameter values

Annotations
@NativeType:ALvoid
alGetSourcei64vSOFTback to summary
public static void alGetSourcei64vSOFT(int source, int param, long[] values)

Array version of: GetSourcei64vSOFT

Annotations
@NativeType:ALvoid
alSource3dSOFTback to summary
public static void alSource3dSOFT(int source, int param, double value1, double value2, double value3)

Sets the 3 dimensional double values of a source parameter.

Parameters
source:int

the source to modify

param:int

the parameter to modify

value1:double

the first value

value2:double

the second value

value3:double

the third value

Annotations
@NativeType:ALvoid
alSource3i64SOFTback to summary
public static void alSource3i64SOFT(int source, int param, long value1, long value2, long value3)

Sets the 3 dimensional 64 bit integer values of a source parameter.

Parameters
source:int

the source to modify

param:int

the parameter to modify

value1:long

the first value

value2:long

the second value

value3:long

the third value

Annotations
@NativeType:ALvoid
alSourcedSOFTback to summary
public static void alSourcedSOFT(int source, int param, double value)

Sets the double value of a source parameter.

Parameters
source:int

the source to modify

param:int

the parameter to modify

value:double

the parameter value

Annotations
@NativeType:ALvoid
alSourcedvSOFTback to summary
public static void alSourcedvSOFT(int source, int param, DoubleBuffer value)

pointer version of SourcedSOFT

Parameters
source:int

the source to modify

param:int

the parameter to modify

value:DoubleBuffer

the parameter values

Annotations
@NativeType:ALvoid
alSourcedvSOFTback to summary
public static void alSourcedvSOFT(int source, int param, double[] value)

Array version of: SourcedvSOFT

Annotations
@NativeType:ALvoid
alSourcei64SOFTback to summary
public static void alSourcei64SOFT(int source, int param, long value)

Sets the 64 bit integer value of a source parameter.

Parameters
source:int

the source to modify

param:int

the parameter to modify

value:long

the parameter values

Annotations
@NativeType:ALvoid
alSourcei64vSOFTback to summary
public static void alSourcei64vSOFT(int source, int param, LongBuffer values)

Array version of Sourcei64SOFT

Parameters
source:int

the source to modify

param:int

the parameter to modify

values:LongBuffer

the parameter values

Annotations
@NativeType:ALvoid
alSourcei64vSOFTback to summary
public static void alSourcei64vSOFT(int source, int param, long[] values)

Array version of: Sourcei64vSOFT

Annotations
@NativeType:ALvoid
nalGetSource3dSOFTback to summary
public static void nalGetSource3dSOFT(int source, int param, long value1, long value2, long value3)

Unsafe version of: GetSource3dSOFT

nalGetSource3i64SOFTback to summary
public static void nalGetSource3i64SOFT(int source, int param, long value1, long value2, long value3)

Unsafe version of: GetSource3i64SOFT

nalGetSourcedSOFTback to summary
public static void nalGetSourcedSOFT(int source, int param, long value)

Unsafe version of: GetSourcedSOFT

nalGetSourcedvSOFTback to summary
public static void nalGetSourcedvSOFT(int source, int param, long values)

Unsafe version of: GetSourcedvSOFT

nalGetSourcei64SOFTback to summary
public static void nalGetSourcei64SOFT(int source, int param, long value)

Unsafe version of: GetSourcei64SOFT

nalGetSourcei64vSOFTback to summary
public static void nalGetSourcei64vSOFT(int source, int param, long values)

Unsafe version of: GetSourcei64vSOFT

nalSourcedvSOFTback to summary
public static void nalSourcedvSOFT(int source, int param, long value)

Unsafe version of: SourcedvSOFT

nalSourcei64vSOFTback to summary
public static void nalSourcei64vSOFT(int source, int param, long values)

Unsafe version of: Sourcei64vSOFT