diff options
author | Chris Robinson <[email protected]> | 2014-07-08 09:13:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-11 00:03:13 -0700 |
commit | f4cdecebcf043758d51885fdb0f84497476b6d96 (patch) | |
tree | 52ad1f71d77ef03d65ad038427c280ec0dee1ecc /OpenAL32 | |
parent | c5af088b5ff1f7b5c51dbdcb7327d3f22c1de5df (diff) |
Add a source radius property that determines the directionality of a sound
At 0 distance from the listener, the sound is omni-directional. As the source
and listener become 'radius' units apart, the sound becomes more directional.
With HRTF, an omni-directional sound is handled using 0-delay, pass-through
filter coefficients, which is blended with the real delay and coefficients as
needed to become more directional.
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alSource.h | 2 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 6c6485ae..e362f096 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -71,6 +71,8 @@ typedef struct ALsource { volatile ALfloat RoomRolloffFactor; volatile ALfloat DopplerFactor; + volatile ALfloat Radius; + enum Resampler Resampler; /** diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 3da891bc..9f6c6a8b 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2407,6 +2407,8 @@ static ALvoid InitSourceParams(ALsource *Source) Source->DopplerFactor = 1.0f; Source->DirectChannels = AL_FALSE; + Source->Radius = 0.0f; + Source->DistanceModel = DefaultDistanceModel; Source->Resampler = DefaultResampler; |