From 71b6e9bfe0f3f188ff48a1acdb29311ee3ed8ed7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 11 Feb 2015 09:32:05 -0800 Subject: Add an option for "basic" HRTF rendering This method is intended to help development by easily testing the quality of the B-Format encode and B-Format-to-HRTF decode. When used with HRTF, all sources are renderer using the virtual B-Format output, rather than just B-Format sources. Despite the CPU cost savings (only four channels need to be filtered with HRTF, while sources all render normally), the spatial acuity offered by the B-Format output is pretty poor since it's only first-order ambisonics, so "full" HRTF rendering is definitely preferred. It's /possible/ for some systems to be edge cases that prefer the CPU cost savings provided by basic over the sharper localization provided by full, and you do still get 3D positional cues, but this is unlikely to be an actual use- case in practice. --- Alc/ALu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/ALu.c') diff --git a/Alc/ALu.c b/Alc/ALu.c index f789b13c..64cf5349 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -563,7 +563,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A voice->IsHrtf = AL_FALSE; } - else if(Device->Hrtf) + else if(Device->Hrtf_Mode == FullHrtf) { voice->Direct.OutBuffer += voice->Direct.OutChannels; voice->Direct.OutChannels = 2; @@ -999,7 +999,7 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte BufferListItem = BufferListItem->next; } - if(Device->Hrtf) + if(Device->Hrtf_Mode == FullHrtf) { /* Use a binaural HRTF algorithm for stereo headphone playback */ aluVector dir = {{ 0.0f, 0.0f, -1.0f, 0.0f }}; -- cgit v1.2.3