public class SOFTDeviceClock
extends java.lang.Object
This extension allows applications to query the timing clock from the audio device. This clock lets applications measure the passage of time as the audio device sees it, which may be slightly different than the system clock's tick rate (the infamous timer drift).
If the SOFT_pause_device extension is available, the device clock does not increment while the device playback is paused. It is
implementation-defined whether or not the device clock increments while no contexts are allocated. The initial clock time value of an opened device is
also implementation-defined, except that it must not be negative and should be low enough to avoid wrapping during program execution.
Requires SOFT_source_latency
| Modifier and Type | Field and Description |
|---|---|
static int |
AL_SAMPLE_OFFSET_CLOCK_SOFT
Accepted as the
param parameter of GetSourcei64vSOFT. |
static int |
AL_SEC_OFFSET_CLOCK_SOFT
Accepted as the
param parameter of GetSourcedvSOFT. |
static int |
ALC_DEVICE_CLOCK_LATENCY_SOFT
Accepted as the
pname parameter of GetInteger64vSOFT. |
static int |
ALC_DEVICE_CLOCK_SOFT
Accepted as the
pname parameter of GetInteger64vSOFT. |
static int |
ALC_DEVICE_LATENCY_SOFT
Accepted as the
pname parameter of GetInteger64vSOFT. |
| Modifier and Type | Method and Description |
|---|---|
static long |
alcGetInteger64vSOFT(long device,
int pname)
Accepts all the same
GetIntegerv queries, in addition to some new ones. |
static void |
alcGetInteger64vSOFT(long device,
int pname,
long[] values)
Array version of:
GetInteger64vSOFT |
static void |
alcGetInteger64vSOFT(long device,
int pname,
java.nio.LongBuffer values)
Accepts all the same
GetIntegerv queries, in addition to some new ones. |
static void |
nalcGetInteger64vSOFT(long device,
int pname,
int size,
long values)
Unsafe version of:
GetInteger64vSOFT |
public static final int ALC_DEVICE_CLOCK_SOFT
pname parameter of GetInteger64vSOFT.public static final int ALC_DEVICE_LATENCY_SOFT
pname parameter of GetInteger64vSOFT.public static final int ALC_DEVICE_CLOCK_LATENCY_SOFT
pname parameter of GetInteger64vSOFT.public static final int AL_SAMPLE_OFFSET_CLOCK_SOFT
param parameter of GetSourcei64vSOFT.
Returns the playback position, expressed in fixed-point samples, along with the device clock, expressed in nanoseconds. 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 device clock, in nanoseconds. This updates at the same rate as the offset, and both are measured atomically with respect to one another.
public static final int AL_SEC_OFFSET_CLOCK_SOFT
param parameter of GetSourcedvSOFT.
Returns the playback position, along with the device clock, 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 device clock, in seconds. This updates at the same rate as the offset, and both are measured atomically with respect to one another. Be aware that this value may be subtly different from the other device clock queries due to the variable precision of floating-point values.
public static void nalcGetInteger64vSOFT(long device,
int pname,
int size,
long values)
GetInteger64vSOFTpublic static void alcGetInteger64vSOFT(long device,
int pname,
java.nio.LongBuffer values)
GetIntegerv queries, in addition to some new ones.
Note that the size parameter is the number of ALCint64SOFT elements in the buffer provided, not the number of bytes.
pname - DEVICE_CLOCK_SOFT | The audio device clock time, expressed in nanoseconds. NULL is an invalid device. |
DEVICE_LATENCY_SOFT | The current audio device latency, in nanoseconds. This is effectively the delay for the samples rendered at the the device's current
clock time fromreaching the physical output. NULL is an invalid device. |
DEVICE_CLOCK_LATENCY_SOFT | Expects a destination size of 2, and provides both the audio device clock time and latency, both in nanoseconds. The two values are
measured atomically with respect to one another (i.e. the latency value was measured at the same time the device clock value was
retrieved). NULL is an invalid device. |
public static long alcGetInteger64vSOFT(long device,
int pname)
GetIntegerv queries, in addition to some new ones.
Note that the size parameter is the number of ALCint64SOFT elements in the buffer provided, not the number of bytes.
pname - DEVICE_CLOCK_SOFT | The audio device clock time, expressed in nanoseconds. NULL is an invalid device. |
DEVICE_LATENCY_SOFT | The current audio device latency, in nanoseconds. This is effectively the delay for the samples rendered at the the device's current
clock time fromreaching the physical output. NULL is an invalid device. |
DEVICE_CLOCK_LATENCY_SOFT | Expects a destination size of 2, and provides both the audio device clock time and latency, both in nanoseconds. The two values are
measured atomically with respect to one another (i.e. the latency value was measured at the same time the device clock value was
retrieved). NULL is an invalid device. |
public static void alcGetInteger64vSOFT(long device,
int pname,
long[] values)
GetInteger64vSOFTCopyright LWJGL. All Rights Reserved. License terms.