Closed Bug 1336098 Opened 7 years ago Closed 7 years ago

When the input is silent, AnalyserNode.getFloatFrequencyData should put -Infinity in the buffer

Categories

(Core :: Web Audio, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

(Depends on 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

This has changed at some point in the spec, and we haven't done the change.
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Attachment #8832876 - Flags: review?(pehrson)
Comment on attachment 8832876 [details] [diff] [review]
fix it and add a test

Review of attachment 8832876 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/webaudio/test/test_analyserNodeMinimum.html
@@ +30,5 @@
> +  sp.onaudioprocess = function() {
> +    analyser.getFloatFrequencyData(buf);
> +    var correct = true;
> +    for (var i = 0; i < buf.length; i++) {
> +     correct |= buf[i] == -Infinity;

This should be &=.

@@ +33,5 @@
> +    for (var i = 0; i < buf.length; i++) {
> +     correct |= buf[i] == -Infinity;
> +    }
> +    ok(correct, "silent input process -Infinity in decibel bins");
> +    if(iteration_count--) {

And this should be negated.
Attachment #8832876 - Flags: review?(pehrson) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/02e6983ec02a
When the input is silent, AnalyserNode.getFloatFrequencyData should put -Infinity in the buffer. r=pehrsons
https://hg.mozilla.org/mozilla-central/rev/02e6983ec02a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Depends on: 1305136
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: