Functions | |
| int | mit_hrtf_availability (int azimuth, int elevation, int samplerate, int diffused) |
| int | mit_hrtf_get (int *pAzimuth, int *pElevation, int samplerate, int diffused, short *psLeft, short *psRight) |
| int mit_hrtf_availability | ( | int | azimuth, | |
| int | elevation, | |||
| int | samplerate, | |||
| int | diffused | |||
| ) |
Checks if an HRTF set is available for the specified settings.
"azimuth" is in the range of [-180, 180] degrees, where position 0 is the centre in front of the listener, negative values are to the left of the listener, and positive values are to the right of the front centre.
"elevation" is in the range of [-90, 90] degrees, where position 0 is the centre in front of the listener, negative values are below the listener, and positive values are above the listener.
"samplerate" can be one of the following: 44100, 48000, 88200, 96000
"diffused" can be 0(false) for the normal set, or 1(true) for the diffused set, which is equalised for less accurate localization in exchange for a flatter frequency response. The diffused set is better suited for music.
Returns the number of taps needed for the each channel of the available set. Returns 0 if the requested HRTF set is not available.
| int mit_hrtf_get | ( | int * | pAzimuth, | |
| int * | pElevation, | |||
| int | samplerate, | |||
| int | diffused, | |||
| short * | psLeft, | |||
| short * | psRight | |||
| ) |
Copies HRTF taps to given buffers, for specified HRTF set.
"pAzimuth" is in the range of [-180, 180] degrees, where position 0 is the centre in front of the listener, negative values are to the left of the listener, and positive values are to the right of the front centre. The variable is a pointer, so that once the function returns, the actual azimuth position used is written to that pointed variable.
"pElevation" is in the range of [-90, 90] degrees, where position 0 is the centre in front of the listener, negative values are below the listener, and positive values are above the listener. The variable is a pointer, so that once the function returns, the actual azimuth position used is written to that pointed variable.
"samplerate" can be one of the following: 44100, 48000, 88200, 96000
"diffused" can be 0(false) for the normal set, or 1(true) for the diffused set, which is equalised for less accurate localization in exchange for a flatter frequency response. The diffused set is better suited for music.
"psLeft" and "psRight" are pointers to buffers allocated (and later deallocated) by the user based on the return value of the "mit_hrtf_availability" function.
Returns the number of taps copied to each of the "psLeft" and "psRight" buffers. Returns 0 if the requested HRTF set is not available or if there was an error.
1.5.1-p1;