diff options
author | Chris Robinson <[email protected]> | 2018-03-31 23:11:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-31 23:11:48 -0700 |
commit | 334bc4f551af15281a9109200f5ffb34f22c67c1 (patch) | |
tree | 09dc5c4ab8556e2ff6e0356cac5106cfdaf08b10 /Alc/panning.c | |
parent | e288c3b44a1417a9c54f4f219f028430959ef198 (diff) |
Limit the near-field control distance to 10m.
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 4 |
1 files 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; |