Class SOFTDeviceClock
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccepted as theparamparameter ofGetSourcei64vSOFT.static final intAccepted as theparamparameter ofGetSourcedvSOFT.static final intAccepted as thepnameparameter ofGetInteger64vSOFT.static final intAccepted as thepnameparameter ofGetInteger64vSOFT.static final intAccepted as thepnameparameter ofGetInteger64vSOFT. -
Method Summary
Modifier and TypeMethodDescriptionstatic longalcGetInteger64vSOFT(long device, int pname) Accepts all the sameGetIntegervqueries, in addition to some new ones.static voidalcGetInteger64vSOFT(long device, int pname, long[] values) Array version of:GetInteger64vSOFTstatic voidalcGetInteger64vSOFT(long device, int pname, LongBuffer values) Accepts all the sameGetIntegervqueries, in addition to some new ones.static voidnalcGetInteger64vSOFT(long device, int pname, int size, long values) Unsafe version of:GetInteger64vSOFT
-
Field Details
-
ALC_DEVICE_CLOCK_SOFT
public static final int ALC_DEVICE_CLOCK_SOFTAccepted as thepnameparameter ofGetInteger64vSOFT.- See Also:
-
ALC_DEVICE_LATENCY_SOFT
public static final int ALC_DEVICE_LATENCY_SOFTAccepted as thepnameparameter ofGetInteger64vSOFT.- See Also:
-
ALC_DEVICE_CLOCK_LATENCY_SOFT
public static final int ALC_DEVICE_CLOCK_LATENCY_SOFTAccepted as thepnameparameter ofGetInteger64vSOFT.- See Also:
-
AL_SAMPLE_OFFSET_CLOCK_SOFT
public static final int AL_SAMPLE_OFFSET_CLOCK_SOFTAccepted as theparamparameter ofGetSourcei64vSOFT.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.
- See Also:
-
AL_SEC_OFFSET_CLOCK_SOFT
public static final int AL_SEC_OFFSET_CLOCK_SOFTAccepted as theparamparameter ofGetSourcedvSOFT.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.
- See Also:
-
-
Method Details
-
nalcGetInteger64vSOFT
public static void nalcGetInteger64vSOFT(long device, int pname, int size, long values) Unsafe version of:GetInteger64vSOFT -
alcGetInteger64vSOFT
Accepts all the sameGetIntegervqueries, in addition to some new ones.Note that the size parameter is the number of
ALCint64SOFTelements in the buffer provided, not the number of bytes.- Parameters:
pname-DEVICE_CLOCK_SOFTThe audio device clock time, expressed in nanoseconds. NULLis an invalid device.DEVICE_LATENCY_SOFTThe 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. NULLis an invalid device.DEVICE_CLOCK_LATENCY_SOFTExpects 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). NULLis an invalid device.
-
alcGetInteger64vSOFT
public static long alcGetInteger64vSOFT(long device, int pname) Accepts all the sameGetIntegervqueries, in addition to some new ones.Note that the size parameter is the number of
ALCint64SOFTelements in the buffer provided, not the number of bytes.- Parameters:
pname-DEVICE_CLOCK_SOFTThe audio device clock time, expressed in nanoseconds. NULLis an invalid device.DEVICE_LATENCY_SOFTThe 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. NULLis an invalid device.DEVICE_CLOCK_LATENCY_SOFTExpects 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). NULLis an invalid device.
-
alcGetInteger64vSOFT
public static void alcGetInteger64vSOFT(long device, int pname, long[] values) Array version of:GetInteger64vSOFT
-