Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panner distance model with distance < refDistance #326

Closed
rtoy opened this issue May 27, 2014 · 2 comments
Closed

Panner distance model with distance < refDistance #326

rtoy opened this issue May 27, 2014 · 2 comments

Comments

@rtoy
Copy link
Member

rtoy commented May 27, 2014

The formulas for the distance model in http://webaudio.github.io/web-audio-api/#idl-def-DistanceModelType shows how to compute the distance effect depending on the distance between the source and listener.

However, no information is given if the distance is less than refDistance, which defaults to 1. The formulas probably should say min(distance,refDistance) so that the audio volume doesn't increase arbitrarily as distance approaches 0.

@rtoy
Copy link
Member Author

rtoy commented Jun 2, 2014

Oops. That should be max(distance, refDistance). Chrome always does this for each of the distance models.

@mdjp
Copy link
Member

mdjp commented Oct 28, 2014

TPAC RESOLUTION: Resolve formulas as recommended

@cwilso cwilso modified the milestone: Web Audio Last Call 1 Oct 29, 2014
rtoy pushed a commit to rtoy/web-audio-api that referenced this issue Oct 8, 2015
Update formulas for the panner distance models to say the distance is
clamped between d_ref and d_max (if apropriate).
rtoy pushed a commit to rtoy/web-audio-api that referenced this issue Oct 8, 2015
The distance formulas include appropriate clamping of the distances to
lie between d_ref and d_max (or infinity) as appropriate.

Fixes WebAudio#326 and WebAudio#328.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants