Closed
Bug 999267
Opened 11 years ago
Closed 10 years ago
AudioSegment::Resample() skips input samples
Categories
(Core :: Audio/Video, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla32
People
(Reporter: karlt, Assigned: karlt)
References
(Depends on 1 open bug)
Details
(Keywords: regression)
Attachments
(3 files, 2 obsolete files)
2.08 KB,
patch
|
padenot
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
31.55 KB,
audio/ogg
|
Details | |
346 bytes,
text/html
|
Details |
Detected by test_mediaElementAudioSourceNode.html after adding MOZ_ASSERT(inFrames == c.mDuration);
at http://hg.mozilla.org/mozilla-central/annotate/5010b38abf18/content/media/AudioSegment.h#l203
Assignee | ||
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
Comment on attachment 8409979 [details] [diff] [review]
patch
Review of attachment 8409979 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch, thanks.
Attachment #8409979 -
Flags: review?(paul) → review+
Assignee | ||
Comment 3•11 years ago
|
||
The previous version was demonstrating frequent instances of bug 750258 and bug 967606.
https://tbpl.mozilla.org/?tree=Try&rev=18c97956d21a
https://tbpl.mozilla.org/?tree=Try&rev=2357ccf39b50
I noticed that the patch was not handling different channels consistently, and I suspect this could produce different results with the resampler stopping at the earlier of consuming input or filling output.
This version depends on bug 997152.
Assignee | ||
Updated•11 years ago
|
Attachment #8409979 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8410867 -
Flags: review?(paul)
Assignee | ||
Comment 4•11 years ago
|
||
Hmm. Still the same test failures.
https://tbpl.mozilla.org/?tree=Try&rev=b8f80bc28c15
https://tbpl.mozilla.org/?tree=Try&rev=5f96699eed9f
Updated•11 years ago
|
Attachment #8410867 -
Flags: review?(paul) → review+
Comment 5•11 years ago
|
||
Oops, I r+ed the wrong patch.
Updated•11 years ago
|
Attachment #8410867 -
Flags: review+ → review?(paul)
Assignee | ||
Comment 6•11 years ago
|
||
Bug 1010000 has a fix for the test failures.
https://tbpl.mozilla.org/?tree=Try&rev=f70e095bc1e8
https://tbpl.mozilla.org/?tree=Try&rev=5d967ba4400a
Assignee | ||
Comment 7•10 years ago
|
||
Regression in quality of MediaElementAudioSourceNode and getUserMedia().
tracking-firefox31:
--- → ?
tracking-firefox32:
--- → ?
Assignee | ||
Comment 9•10 years ago
|
||
Paul, it would be good to fix this before it reaches too many beta builds, but I still think this second patch is the better fix.
Is there anything I can do to help with review?
(In reply to Karl Tomlinson (needinfo?:karlt) from comment #3)
> I noticed that the patch was not handling different channels consistently,
> and I suspect this could produce different results with the resampler
> stopping at the earlier of consuming input or filling output.
What I'm addressing here is that sometimes the resampler needs to be able to read extra input samples without producing any output samples. If that happens with the first patch, outFrames would be reset after the first channel to the number of out frames that were produced. For the next channel, that limit on output can lead to olen being 0 at http://hg.mozilla.org/mozilla-central/annotate/882826199076/media/libspeex_resampler/src/resample.c#l891
which would mean that remaining available input would not be read.
Flags: needinfo?(paul)
Updated•10 years ago
|
Attachment #8410867 -
Flags: review?(paul) → review+
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(paul)
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd5d24cb3246
This can be tested with Web Audio but bug 983062 and bug 983023 mean we don't get the expected results at the beginning and end of a track. A file with some silence at each end could be used, if those bugs are not fixed.
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox32:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Updated•10 years ago
|
Target Milestone: mozilla33 → mozilla32
Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8410867 [details] [diff] [review]
v2, handling of multiple channels
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 818822
User impact if declined: Regression in quality of MediaElementAudioSourceNode and getUserMedia().
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky):
Moderate risk due to some assumptions about the parameters passed to this method.
Those assumptions are already present in the code, but this patch could change behavior if those assumptions are violated.
String or IDL/UUID changes made by this patch: none.
Attachment #8410867 -
Flags: approval-mozilla-beta?
Updated•10 years ago
|
Updated•10 years ago
|
Attachment #8410867 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 13•10 years ago
|
||
status-b2g-v2.0:
--- → fixed
status-firefox31:
--- → fixed
Comment 14•10 years ago
|
||
Is there a way QA could manually verify this? Thank you!
Flags: needinfo?(karlt)
Assignee | ||
Comment 15•10 years ago
|
||
Flags: needinfo?(karlt)
Assignee | ||
Comment 16•10 years ago
|
||
This should sound like playing 440.ogg directly (expect for a click every few seconds or so due to other bugs). Before this bug was fixed there was a chatter from the distortion.
Assignee | ||
Comment 17•10 years ago
|
||
Attachment #8449781 -
Attachment is obsolete: true
Comment 18•10 years ago
|
||
Thanks for the testcase, Karl.
I could hear the distortion using a Nightly 31 build from 2014-04-17 very well on Win 7 and Ubuntu, but it wasn't so clear on Mac.
That distortion is no longer present on Firefox 31 beta 6 and latest Aurora 32.0a2 20140702004004 under Win 7 64-bit and Ubuntu 12.10 32-bit although from time to time a small distortion sound can be heard.
Marking as verified since the behavior is very much improved.
You need to log in
before you can comment on or make changes to this bug.
Description
•