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

PannerNode refDistance description unclear #2184

Closed
tim-we opened this issue Mar 26, 2020 · 4 comments
Closed

PannerNode refDistance description unclear #2184

tim-we opened this issue Mar 26, 2020 · 4 comments

Comments

@tim-we
Copy link
Contributor

tim-we commented Mar 26, 2020

The current description for the refDistance attribute [1] is

A reference distance for reducing volume as source moves further from the listener. The default value is 1. A RangeError exception MUST be thrown if this is set to a negative value.

From the formulas for each DistanceModelType [2] one can deduce that it is the distance at which there is no reduction in volume (gain=1). To me this is not clear from the description above.
For further clarification I suggest adding at least a sentence like

For distances greater than this the volume will be reduced.

If it is just me or you think the formulas in the specification are enough to describe this, feel free to just close & dismiss this issue.

[1] https://webaudio.github.io/web-audio-api/#dom-pannernode-refdistance
[2] https://webaudio.github.io/web-audio-api/#dom-distancemodeltype-linear

@rtoy
Copy link
Member

rtoy commented Mar 26, 2020

Teleconf: This makes sense and clarifies the behavior. We'll add this.

@rtoy rtoy added this to Untriaged in V1 via automation Mar 26, 2020
@rtoy rtoy moved this from Untriaged to Ready for Editing in V1 Mar 26, 2020
@rtoy
Copy link
Member

rtoy commented Mar 27, 2020

But instead of saying

For distances greater than this the volume will be reduced.

I think it's better to say something like

For distances less than this, the volume is not reduced.

because the current spec already says the volume is being reduced.

Thanks for bringing this to our attention.

rtoy added a commit to rtoy/web-audio-api that referenced this issue Mar 27, 2020
Just mention that the volume is not reduced when the distance is less
than the refDistance.
@tim-we tim-we closed this as completed Mar 27, 2020
V1 automation moved this from Ready for Editing to Done Mar 27, 2020
@tim-we tim-we reopened this Mar 27, 2020
V1 automation moved this from Done to Untriaged Mar 27, 2020
@tim-we
Copy link
Contributor Author

tim-we commented Mar 27, 2020

Yes that sounds good to me. Sorry I was a bit quick about closing this issue, I did not notice this commit was on a fork.

@rtoy
Copy link
Member

rtoy commented Mar 27, 2020

No problem. When the PR lands, this issue will get closed automatically.

@padenot padenot closed this as completed in fe221f3 Apr 2, 2020
V1 automation moved this from Untriaged to Done Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
V1
  
Done
Development

No branches or pull requests

3 participants