-
Notifications
You must be signed in to change notification settings - Fork 166
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
Use consistent language and approach to document algorithms #260
Comments
Since section numbering changes now and then, let me clarify that this refers to Section 11. Spatialization / Panning (http://www.w3.org/TR/webaudio/#Spatialization) I am not an expert on pseudo-code, but this looks like c++, assuming usage of a vector library such as https://code.google.com/p/slmath/. Unsurprisingly, it is derived very closely from Chrome source: void PannerNode::getAzimuthElevation(double* outAzimuth, double* outElevation)
Not really, seeing as the actual data the example is supposed to process is not present. I don't think this is the actual problem - it is describing an algorithm which is to be followed to calculate azimuth and elevation. My question would be more along the lines of - do we need this pseudo-code at all, seeing as azimuth and elevation are fairly well-defined mathematical constructs? |
I'd rather keep it. If needed we can convert it to Javascript. Note that we are going to modify it slightly, as we have found a couple problems while implementing it in Gecko. There is an ML thread about that by Karl, iirc. |
Is this the thread you refer to? |
Olivier Thereaux writes:
That thread was about what to do when the input directions didn't There was also the fact that azimuth is not defined when elevation Really the bug here is in the "equalpower" model, where the axis Olivier Thereaux writes:
I'm not sure that "azimuth" is necessarily defined to be zero when Perhaps the full algorithm is not necessary, but if that is All of this would be kind of irrelevant if we fix the equalpower Karl. |
Are these examples still relevant given the changes to PannerNode? |
We could simply unify all the codes in the spec (whether normative or informative) to be JavaScript. We may need to define the vector operations. Then, it's very possible that it could be executed. |
Resolution: we will use JavaScript |
The following issue was raised by the W3C TAG as part of their review of the Web Audio API
What language are the examples in Section 11 written in? Can it be executed?
The text was updated successfully, but these errors were encountered: