diff options
author | Chris Robinson <[email protected]> | 2011-05-01 13:59:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-01 13:59:44 -0700 |
commit | 56d9418119045d536efa3f552af6e13d9353ada9 (patch) | |
tree | a1688ab2434cd8f3c1bfdb2c928117b50c357b08 /OpenAL32/alSource.c | |
parent | 0109104027ec4de46c236f6520cf00d89dd980ad (diff) |
Add an HRTF filter for mono sources
The data is based on the KEMAR HRTF data provided by MIT, which can be found at
<http://sound.media.mit.edu/resources/KEMAR.html>. The compact measurements
were used. See hrtf_tables.inc for more information.
The filter is only available for stereo output, using a 44100hz playback rate.
Note also that it currently only applies to mono sounds, and the cf_level and
head_dampen config options are ignored while it is active.
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index ed69af34..14beb85f 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1348,6 +1348,10 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) Source->BuffersPlayed = 0; Source->Buffer = Source->queue->buffer; + + for(j = 0;j < HRTF_LENGTH;j++) + Source->HrtfHistory[j] = 0.0f; + Source->HrtfOffset = 0; } else Source->state = AL_PLAYING; |