Closed Bug 1187785 Opened 9 years ago Closed 9 years ago

Interpolation between band-limited PeriodicWave tables is reversed

Categories

(Core :: Web Audio, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed
b2g-v2.5 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

(Keywords: regression)

Attachments

(2 files)

This is a regression from
https://hg.mozilla.org/mozilla-central/rev/b39629d18e66#l1.22
but the problem is that waveDataForFundamentalFrequency() is not consistent
with its documentation.  tableInterpolationFactor should be zero when using
lowerWaveData, which is when pitchRange is rangeIndex2.
https://hg.mozilla.org/mozilla-central/annotate/2ddec2dedced/dom/media/webaudio/blink/PeriodicWave.cpp#l146
tableInterpolationFactor = 0 now means use lowerWaveData, which is
rangeIndex2.
Attachment #8639138 - Flags: review?(giles)
Comment on attachment 8639138 [details] [diff] [review]
reverse tableInterpolationFactor to make it consistent with documentation

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

This code remains quite confusing! Seems to be consistent with both comments now.
Attachment #8639138 - Flags: review?(giles) → review+
(In reply to Ralph Giles (:rillian) from comment #3)
> This code remains quite confusing! Seems to be consistent with both comments
> now.

Yes, sorry this hasn't helped much.  At least there's now a test.
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/e2c005a1936d
https://hg.mozilla.org/mozilla-central/rev/161362ba8d68
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: