OpenAL - 在 AL_REFERENCE_DISTANCE 范围内会导致无法进行 3D 渲染吗?
当我使用 OpenAL 并使用 AL_REFERENCE_DISTANCE
时,我似乎无法获得声音的 3D 渲染。它以最大增益播放,但没有 3D 效果。这是为什么呢?
编辑:
例如,将 REFERENCE_DISTANCE
设置为 10.0f
以获得该区域内的最大增益
It seems when I use OpenAL and am withing the AL_REFERENCE_DISTANCE
, I get no 3D rendering of the sound. It is played at max gain, but no 3D effect. Why is this?
EDIT:
For example, setting REFERENCE_DISTANCE
to 10.0f
for max gain within that area
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 Damons 的评论:
当源始终以最大增益播放时,即根本没有衰减,很可能:
您设置了参数组合(最常见的是
AL_REFERENCE_DISTANCE
=AL_MAX_DISTANCE
),不允许评估距离或衰减计算(最常见的是因为除以零)。“无 3D”(但不是“始终最大增益”)的另一个常见原因是播放立体声。立体声源就是立体声。它们从未以 3D 形式呈现。
As per Damons comment:
When a source always plays at max gain, i.e. has no attenuation at all, chances are that:
you've set a combination of parameters (most commonly
AL_REFERENCE_DISTANCE
=AL_MAX_DISTANCE
) that does not allow for evaluation of distance or attenuation calculations (most commonly because of divide by zero).Another popular reason for "no 3D" (but not for "always max gain") is playing a stereo sound. Stereo sources are just that, stereo. They're never rendered in 3D.