Closed Bug 1222405 Opened 9 years ago Closed 9 years ago

Build band limited tables lazily in PeriodicWave

Categories

(Core :: Web Audio, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

Details

Attachments

(3 files)

In Bug 1171436, :karlt suggested building the band limited tables for PeriodicWave lazily:

The tricky part is that, when createBandLimitedTables() is called, we don't know what the fundamental frequency will be, and so we don't know which partials will be above Nyquist.

Part of the full optimization solution would be to create the tables lazily, when required, at which point the fundamental is known, but I'm guessing that might be quite a redesign.
Assignee: nobody → dminor
Rank: 25
Priority: -- → P2
Status: NEW → ASSIGNED
Bug 1222405 - (part 1) Store PeriodicWave components for later use r?padenot

We need to store the components used to create the PeriodicWave for later use
if we want to be able to build the band limited tables lazily.
Attachment #8688945 - Flags: review?(padenot)
Bug 1222405 - (part 2) Build band limited tables after fundamental frequency is known r?padenot

If we build the band limited tables after the fundamental frequency is known,
we can exclude partials that are above the nyquist frequency for the sampling
frequency being used.

We rebuild the band limited tables each time we see a request for data for a
lower fundamental frequency so we have the required partials.
Attachment #8688946 - Flags: review?(padenot)
Bug 1222405 - (part 3) Build band limited tables lazily r?padenot

This builds the band limited tables for each range index individually as
required.
Attachment #8688947 - Flags: review?(padenot)
Comment on attachment 8688945 [details]
MozReview Request: Bug 1222405 - (part 1) Store PeriodicWave components for later use r=padenot

https://reviewboard.mozilla.org/r/25465/#review23479

::: dom/media/webaudio/blink/PeriodicWave.h:107
(Diff revision 1)
>      // Creates tables based on numberOfComponents Fourier coefficients.

This comment needs to be updated.
Attachment #8688945 - Flags: review?(padenot) → review+
Comment on attachment 8688946 [details]
MozReview Request: Bug 1222405 - (part 2) Build band limited tables after fundamental frequency is known r=padenot

https://reviewboard.mozilla.org/r/25467/#review23597
Attachment #8688946 - Flags: review?(padenot) → review+
Comment on attachment 8688947 [details]
MozReview Request: Bug 1222405 - (part 3) Build band limited tables lazily r=padenot

https://reviewboard.mozilla.org/r/25469/#review23599
Attachment #8688947 - Flags: review?(padenot) → review+
Comment on attachment 8688945 [details]
MozReview Request: Bug 1222405 - (part 1) Store PeriodicWave components for later use r=padenot

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25465/diff/1-2/
Attachment #8688945 - Attachment description: MozReview Request: Bug 1222405 - (part 1) Store PeriodicWave components for later use r?padenot → MozReview Request: Bug 1222405 - (part 1) Store PeriodicWave components for later use r=padenot
Comment on attachment 8688946 [details]
MozReview Request: Bug 1222405 - (part 2) Build band limited tables after fundamental frequency is known r=padenot

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25467/diff/1-2/
Attachment #8688946 - Attachment description: MozReview Request: Bug 1222405 - (part 2) Build band limited tables after fundamental frequency is known r?padenot → MozReview Request: Bug 1222405 - (part 2) Build band limited tables after fundamental frequency is known r=padenot
Comment on attachment 8688947 [details]
MozReview Request: Bug 1222405 - (part 3) Build band limited tables lazily r=padenot

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25469/diff/1-2/
Attachment #8688947 - Attachment description: MozReview Request: Bug 1222405 - (part 3) Build band limited tables lazily r?padenot → MozReview Request: Bug 1222405 - (part 3) Build band limited tables lazily r=padenot
See Also: → 1232326
Depends on: 1240054
Depends on: 1267579
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: