From 56d9418119045d536efa3f552af6e13d9353ada9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 1 May 2011 13:59:44 -0700 Subject: Add an HRTF filter for mono sources The data is based on the KEMAR HRTF data provided by MIT, which can be found at . 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. --- OpenAL32/Include/alMain.h | 1 + OpenAL32/alSource.c | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 6c18a387..9cf2b1a4 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -587,6 +587,7 @@ ALboolean IsValidChannels(ALenum type); #define HRTF_BITS (7) #define HRTF_LENGTH (1<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; -- cgit v1.2.3