Class SOFTHRTF
This extension allows an application to request and determine the status of HRTF mixing. HRTF, or Head-Related Transfer Function, is a method of mixing 3D audio for "true" 3D panning, typically using filters designed to simulate how sound is affected by a listener's head as the sound waves travel between the ears.
As a 3D sound API, OpenAL's design allows implementations to transparently render audio using HRTF. However, the OpenAL API currently has no concept of HRTF so there's no way to query if it's being used, and no way for an application to request it on behalf of the user. This aims to fix that.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Accepted as part of theattrList
parameter ofCreateContext
andResetDeviceSOFT
, for theHRTF_SOFT
attribute.static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
Accepted as part of theattrList
parameter ofCreateContext
andResetDeviceSOFT
, and as theparamName
parameter ofGetIntegerv
.static final int
static final int
Accepted as theparamName
parameter ofGetIntegerv
.static final int
Possible results from aHRTF_STATUS_SOFT
query.static final int
Accepted as theparamName
parameter ofGetIntegerv
. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable String
alcGetStringiSOFT
(long device, int paramName, int index) Returns a human-readable string for an HRTF.static boolean
alcResetDeviceSOFT
(long device, int @Nullable [] attrList) Array version of:ResetDeviceSOFT
static boolean
alcResetDeviceSOFT
(long device, @Nullable IntBuffer attrList) Resets a device after it is opened for playback, to attempt changing the playback properties.static long
nalcGetStringiSOFT
(long device, int paramName, int index) Unsafe version of:GetStringiSOFT
static boolean
nalcResetDeviceSOFT
(long device, long attrList) Unsafe version of:ResetDeviceSOFT
-
Field Details
-
ALC_HRTF_SOFT
public static final int ALC_HRTF_SOFTAccepted as part of theattrList
parameter ofCreateContext
andResetDeviceSOFT
, and as theparamName
parameter ofGetIntegerv
.- See Also:
-
ALC_HRTF_ID_SOFT
public static final int ALC_HRTF_ID_SOFT- See Also:
-
ALC_DONT_CARE_SOFT
public static final int ALC_DONT_CARE_SOFTAccepted as part of theattrList
parameter ofCreateContext
andResetDeviceSOFT
, for theHRTF_SOFT
attribute.- See Also:
-
ALC_HRTF_STATUS_SOFT
public static final int ALC_HRTF_STATUS_SOFTAccepted as theparamName
parameter ofGetIntegerv
.- See Also:
-
ALC_NUM_HRTF_SPECIFIERS_SOFT
public static final int ALC_NUM_HRTF_SPECIFIERS_SOFTAccepted as theparamName
parameter ofGetIntegerv
.- See Also:
-
ALC_HRTF_SPECIFIER_SOFT
public static final int ALC_HRTF_SPECIFIER_SOFT- See Also:
-
ALC_HRTF_DISABLED_SOFT
public static final int ALC_HRTF_DISABLED_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
ALC_HRTF_ENABLED_SOFT
public static final int ALC_HRTF_ENABLED_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
ALC_HRTF_DENIED_SOFT
public static final int ALC_HRTF_DENIED_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
ALC_HRTF_REQUIRED_SOFT
public static final int ALC_HRTF_REQUIRED_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
ALC_HRTF_HEADPHONES_DETECTED_SOFT
public static final int ALC_HRTF_HEADPHONES_DETECTED_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
ALC_HRTF_UNSUPPORTED_FORMAT_SOFT
public static final int ALC_HRTF_UNSUPPORTED_FORMAT_SOFTPossible results from aHRTF_STATUS_SOFT
query.- See Also:
-
-
Method Details
-
nalcGetStringiSOFT
public static long nalcGetStringiSOFT(long device, int paramName, int index) Unsafe version of:GetStringiSOFT
-
alcGetStringiSOFT
Returns a human-readable string for an HRTF.The returned string will be an implementation-defined UTF-8 encoded specifier for the given HRTF index, designed for display to the user. The returned strings are valid until the next enumeration point or the device is closed.
- Parameters:
device
- he same one that previously queried the number of HRTF specifiersparamName
- the parameter to query. Must be:HRTF_SPECIFIER_SOFT
index
- an index between 0 (inclusive) and the previously-queried HRTF count (exclusive)
-
nalcResetDeviceSOFT
public static boolean nalcResetDeviceSOFT(long device, long attrList) Unsafe version of:ResetDeviceSOFT
-
alcResetDeviceSOFT
Resets a device after it is opened for playback, to attempt changing the playback properties.- Parameters:
device
- a handle to a valid playback device as returned byOpenDevice
, otherwise the call fails and anINVALID_DEVICE
error is generatedattrList
- the same as what could be passed toCreateContext
. The AL is allowed to ignore attributes and attribute value combinations the device cannot support, for example if the device doesn't support the requestedFREQUENCY
value, another value it does support may be set.- Returns:
- on success the function returns
TRUE
, and on failure the function returnsFALSE
. Note that a return ofTRUE
does not indicate any attributes were honored, just that the device was successfully reset. If you need to know what the attributes are after a reset, query the device usingGetIntegerv
with the relevant attributes.
-
alcResetDeviceSOFT
public static boolean alcResetDeviceSOFT(long device, int @Nullable [] attrList) Array version of:ResetDeviceSOFT
-