Closed Bug 967924 Opened 7 years ago Closed 7 years ago

correct resampler input buffer sample count estimate math

Categories

(Core :: Web Audio, defect, P2)

28 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox27 --- unaffected
firefox28 --- affected
firefox29 --- affected

People

(Reporter: karlt, Assigned: karlt)

References

Details

(Keywords: perf, regression, Whiteboard: [land after bug 966636])

Attachments

(1 file)

I got the fraction the wrong way round in https://hg.mozilla.org/mozilla-central/rev/9b1da46deff2#l1.98
The numerator here corresponds to the input sample rate:
http://hg.mozilla.org/mozilla-central/annotate/2c366892729d/media/libspeex_resampler/src/resample.c#l1037

This means multiple calls to the resampler for down-sampling by a large ratio, which makes this very slow as the resampler shifts its buffer of filter inputs in each call.  Fortunately this is not very common.

There is also a small cost when down-sampling by moderate ratios, and, particularly on mobile, when up-sampling by large ratios.
P2 because I don't expect this to be particularly significant.
Attached patch patchSplinter Review
Attachment #8370438 - Flags: review?(paul)
Version: 25 Branch → 28 Branch
Depends on: 966636
Whiteboard: [land after bug 966636]
Attachment #8370438 - Flags: review?(paul) → review+
https://hg.mozilla.org/mozilla-central/rev/5282b4fa4cea
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.