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

AnalyzerNode::getByteFrequencyData claims that an element in the Uint8array is set to negative infinity #32640

Closed
alexvitkov opened this issue Mar 11, 2024 · 1 comment
Labels
area: Web Audio Content:WebAPI Web API docs goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. help wanted If you know something about this topic, we would love your help!

Comments

@alexvitkov
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData#array

What specific section or headline is this issue about?

The array parameter

What information was incorrect, unhelpful, or incomplete?

For the array parameter in AnalyzerNode::getByteFrequencyData, the docs claim that

The Uint8array that the frequency domain data will be copied to. For any sample which is silent, the value is -Infinity

This is wrong since an Uint8 cannot be set to negative infinity.
It was probably copy-pasted from getFloatFrequencyData, which does the same as this method, but fills out a Float32Array instead of a Uint8array

What did you expect to see?

It shouldn't be claimed that an uint8 will be set to negative infinity.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@alexvitkov alexvitkov added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 11, 2024
@github-actions github-actions bot added the Content:WebAPI Web API docs label Mar 11, 2024
@alexvitkov alexvitkov changed the title AnalyzerNode::getByteFrequencyData claims an element in the Uint8array is set to negative infinity Mar 11, 2024
@caugner caugner added the goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. label Mar 15, 2024
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! area: Web Audio and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 5, 2024
@Josh-Cena
Copy link
Member

Fixed by #32813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Web Audio Content:WebAPI Web API docs goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. help wanted If you know something about this topic, we would love your help!
3 participants