aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-01-15 13:57:22 -0800
committerChris Robinson <[email protected]>2017-01-15 13:57:22 -0800
commit9f23d17333c8faaa0a2b7a86df33c41874a929a5 (patch)
treedd68191ae059b295ada025738d3185845596bdc0 /Alc/ALu.c
parent8e868823fd0226a960259363cd7b49ea51ece426 (diff)
Use second-order ambisonics for basic HRTF rendering
This should improve positional quality for relatively low cost. Full HRTF rendering still only uses first-order since the only use of the dry buffer there is for first-order content (B-Format buffers, effects).
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index dc979522..192f2a35 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1488,6 +1488,13 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
{
int lidx = GetChannelIdxByName(device->RealOut, FrontLeft);
int ridx = GetChannelIdxByName(device->RealOut, FrontRight);
+
+ if(device->AmbiUp)
+ ambiup_process(device->AmbiUp,
+ device->Dry.Buffer, device->Dry.NumChannels,
+ SAFE_CONST(ALfloatBUFFERSIZE*,device->FOAOut.Buffer), SamplesToDo
+ );
+
if(lidx != -1 && ridx != -1)
{
HrtfDirectMixerFunc HrtfMix = SelectHrtfMixer();