Closed Bug 1480661 Opened 6 years ago Closed 6 years ago

avoid reading channel count of most recent delay buffer input when reading samples at max delay

Categories

(Core :: Web Audio, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(5 files)

When maxDelay in DelayBuffer::Read() is mMaxDelayTicks and these are an integer multiple of block size, the +1 for determining oldestChunk for channel count calculation is enough to wrap around the buffer and find the most recent chunk. The most recent chunk may have a different channel count to that of the oldest chunk, which is from where output samples are obtained. This is causing some unexpected behavior in tests I'm writing for bug 1474222.
Comment on attachment 8997743 [details] bug 1480661 move DelayNode channelCount test to wpt https://reviewboard.mozilla.org/r/261470/#review268476 I think this test is consistent with the intention of the consensus in https://github.com/WebAudio/web-audio-api/issues/25 but the wording that ended up in the spec is not so clear IMO, and so I'm not sure whether this should go into wpt yet or not. What do you think, Paul?
(In reply to Karl Tomlinson (:karlt) from comment #7) > I think this test is consistent with the intention of the consensus in > https://github.com/WebAudio/web-audio-api/issues/25 > but the wording that ended up in the spec is not so clear IMO, > and so I'm not sure whether this should go into wpt yet or not. > What do you think, Paul? I'd tend to agree with you.
Comment on attachment 8997741 [details] bug 1480661 avoid reading channel count of most recent delay buffer input when reading samples at max delay https://reviewboard.mozilla.org/r/261466/#review269352 My reviews were blocked during my PTO but this looks finished, so I'm having a look.
Attachment #8997741 - Flags: review+
Attachment #8997742 - Flags: review+
Comment on attachment 8997743 [details] bug 1480661 move DelayNode channelCount test to wpt https://reviewboard.mozilla.org/r/261470/#review269356 To me, this is what was intended in issue #25. However, I agree that the current text is weird. I've filed https://github.com/WebAudio/web-audio-api/issues/1718 to clarify this.
Attachment #8997743 - Flags: review+
Comment on attachment 8997745 [details] bug 1480661 use single precision for operating on delay values https://reviewboard.mozilla.org/r/261474/#review269364
Attachment #8997745 - Flags: review+
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d168f623e879 avoid reading channel count of most recent delay buffer input when reading samples at max delay r=padenot https://hg.mozilla.org/integration/autoland/rev/8d9e3375e91d add test for DelayNode channelCount r=padenot https://hg.mozilla.org/integration/autoland/rev/3802f485af6f move DelayNode channelCount test to wpt r=padenot https://hg.mozilla.org/integration/autoland/rev/a1f7a37f6390 remove unused mCurrentDelay r=padenot https://hg.mozilla.org/integration/autoland/rev/b3f01b9ce2bf use single precision for operating on delay values r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12464 for changes under testing/web-platform/tests
Thank you for jumping on this Paul, and for filing the spec issue.
Flags: in-testsuite+
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
See Also: → 1483174
On MSVS C++ this gives a compiler warning, and turning warnings into errors, this doesn't compile: https://hg.mozilla.org/mozilla-central/rev/b3f01b9ce2bf#l4.12 -const double MaxDelayTimeSeconds = 0.002; +const float MaxDelayTimeSeconds = 0.002; 8:46.23 c:/mozilla-source/comm-central/dom/media/webaudio/blink/HRTFPanner.cpp(40): error C2220: warning treated as error - no 'object' file generated 8:46.23 c:/mozilla-source/comm-central/dom/media/webaudio/blink/HRTFPanner.cpp(40): warning C4305: 'initializing': truncation from 'double' to 'float'
Flags: needinfo?(padenot)
Depends on: 1483174
Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: