From 334bc4f551af15281a9109200f5ffb34f22c67c1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 31 Mar 2018 23:11:48 -0700 Subject: Limit the near-field control distance to 10m. --- Alc/panning.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Alc/panning.c b/Alc/panning.c index cb4406a8..7ed27852 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -425,7 +425,7 @@ static void InitNearFieldCtrl(ALCdevice *device, ALfloat ctrl_dist, ALsizei orde /* NFC is only used when AvgSpeakerDist is greater than 0, and can only * be used when rendering to an ambisonic buffer. */ - device->AvgSpeakerDist = ctrl_dist; + device->AvgSpeakerDist = minf(ctrl_dist, 10.0f); device->Dry.NumChannelsPerOrder[0] = 1; if(periphonic) @@ -937,7 +937,7 @@ static void InitHrtfPanning(ALCdevice *device) /* NFC is only used when AvgSpeakerDist is greater than 0, and can only * be used when rendering to an ambisonic buffer. */ - device->AvgSpeakerDist = device->HrtfHandle->distance; + device->AvgSpeakerDist = minf(device->HrtfHandle->distance, 10.0f); i = 0; device->Dry.NumChannelsPerOrder[i++] = 1; -- cgit v1.2.3