Closed Bug 1215096 Opened 6 years ago Closed 6 years ago

off-by-one error in playback position of resampled buffers

Categories

(Core :: Web Audio, defect, P2)

44 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(1 file)

"The behavior of an expression of the form E1 op = E2 is equivalent to E1 = E1
op E2 except that E1 is evaluated only once", which means that the subtraction
of -= is happening before conversion from double to unsigned int.

The "+ 0.5" subtracted before the truncation toward zero causes rounding
to nearest minus one, except when nearest is zero.

http://hg.mozilla.org/mozilla-central/annotate/e193b4da0a8c/dom/media/webaudio/AudioBufferSourceNode.cpp#l273
Attachment #8674596 - Flags: review?(padenot) → review+
Rank: 20
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/b24c94ea76e0
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.