Closed Bug 1240054 Opened 10 years ago Closed 10 years ago

Entirely Web Audio generated sound cuts out after a little while, or emits random tap tap tap sounds then silence

Categories

(Core :: Web Audio, defect, P1)

45 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox45 + fixed
firefox46 --- fixed

People

(Reporter: sole, Assigned: dminor)

References

Details

(Keywords: DevAdvocacy, regression)

Attachments

(1 file)

This should play the entire THX sound for 26 seconds, but it either cuts out too early or doesn't play anything at all in latest Nightly (46 2016-01-15). The "speaker" icon on the tab is active throughout even if nothing or just some weird tap tap tap noise can be heard. For a demo: http://sole.github.io/test_cases/web_audio/thx_cutting_out/ Source: https://github.com/sole/test_cases/tree/gh-pages/web_audio/thx_cutting_out I have extracted the "offending code" out of a bigger piece of code (my slide deck at http://soledadpenades.com/files/t/2015_howa/#1 ), but I don't really know what is the reason for this cutting out or what else to extract out-sounds like perhaps something related to the filters and their automation? as the rest of slides seem to work all fine. I tried changing the amount of oscillators but the end result is always the same, i.e. sound cuts out too early, does tap tap tap or doesn't play at all. I tried this in DevEdition 44 and it was fine, then it updated and stopped working. Nightly hasn't been working at all in the whole week (since I was told about the bug by someone in twitter on Monday, and it's Friday).
Keywords: DevAdvocacy
Paul, thanks for tracking that down for me. The band limited tables are rebuilt when the newly requested fundamental frequency is less than the old one because we may have more partials. In this case, we're decreasing the fundamental frequency at each step, so we end up rebuilding the tables over and over again. I think we can be smarter about rebuilding the tables; worse comes to worst, I can revert the changes in [1]. [1] https://hg.mozilla.org/integration/mozilla-inbound/rev/3785489fa210
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Flags: needinfo?(dminor)
We currently rebuild the BandLimitedTables whenever we encounter a lower fundamental frequency but it is only necessary to rebuild the tables if we can fit more partials below the Nyquist frequency. Rebuilding the tables unnecessarily can cause performance problems, particularly in the case where the frequency is continually lowered. Review commit: https://reviewboard.mozilla.org/r/31229/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31229/
Attachment #8709014 - Flags: review?(padenot)
Comment on attachment 8709014 [details] MozReview Request: Bug 1240054 - Only rebuild BandLimitedTables if more partials are required r?padenot https://reviewboard.mozilla.org/r/31229/#review27999 Thanks. I take it this fixes Sole's problem ? Because this is a performance issue, it's a bit hard to test, but we should ask for uplift regardless.
Attachment #8709014 - Flags: review?(padenot) → review+
> Thanks. I take it this fixes Sole's problem ? Because this is a performance > issue, it's a bit hard to test, but we should ask for uplift regardless. I compared a build with this patch applied to an unaffected version of firefox ("iceweasel 38.5.0") and the playback sounded the same to me. It definitely fixes the audio cut out / tap tap tap problems.
[Tracking Requested - why for this release]: Regression caused by Bug 122405, landed in Fx45.
Rank: 15
Keywords: regression
Priority: -- → P1
Typo in comment 7. Should say Bug 1222405.
Blocks: 1222405
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Sole-- Can you test against the latest Nightly? We want to verify that this fix resolves your reported problem. We're planning to ask for uplift to Fx45 (and we'd love to get the fix in before we cut the first Beta Fx45). Thanks!
Flags: needinfo?(sole)
It's working! \o/
Flags: needinfo?(sole)
Excellent! Thanks, Sole -- especially for the quick reply! Hi Dan - Sole verifies this fixes her problem. \o/ Can you ask for uplift to Fx45 today? And thanks for taking this one!! I really appreciate it.
Flags: needinfo?(dminor)
Comment on attachment 8709014 [details] MozReview Request: Bug 1240054 - Only rebuild BandLimitedTables if more partials are required r?padenot Approval Request Comment [Feature/regressing bug #]: Bug 1222405 [User impact if declined]: Significant performance problems for any oscillator with a downward sweeping frequency which can result in unplayable audio. [Describe test coverage new/current, TreeHerder]: Not currently tested because it is a performance problem, I plan to add a benchmark in [1] to catch further regressions of this type. [Risks and why]: If there is a bug in the changed code we may not include as many partials as we should which could result in reduced audio quality. This should be caught by the current unit tests, so this is unlikely. [String/UUID change made/needed]: None [1] https://github.com/padenot/webaudio-benchmark
Flags: needinfo?(dminor)
Attachment #8709014 - Flags: approval-mozilla-aurora?
Comment on attachment 8709014 [details] MozReview Request: Bug 1240054 - Only rebuild BandLimitedTables if more partials are required r?padenot Fix a regression, taking it
Attachment #8709014 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
has problems uplifting grafting 324344:f704088e0566 "Bug 1240054 - Only rebuild BandLimitedTables if more partials are required r=padenot" merging dom/media/webaudio/blink/PeriodicWave.cpp warning: conflicts while merging dom/media/webaudio/blink/PeriodicWave.cpp! (edit, then use 'hg resolve --mark') abort: unresolved conflicts, can't continue (use hg resolve and hg graft --continue) could you take look, thanks!
Flags: needinfo?(dminor)
Version: unspecified → 45 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: