Closed
Bug 886653
Opened 11 years ago
Closed 11 years ago
AudioBufferSourceNodeEngine::UpdateSampleRateIfNeeded() calls speex_resampler_skip_zeros() midstream
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
Tracking | Status | |
---|---|---|
firefox23 | --- | unaffected |
firefox24 | + | fixed |
firefox25 | + | fixed |
People
(Reporter: karlt, Assigned: padenot)
References
Details
(Whiteboard: [blocking-webaudio+][qa-])
Attachments
(1 file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
http://hg.mozilla.org/mozilla-central/annotate/c87a950e1a09/content/media/webaudio/AudioBufferSourceNode.cpp#l346
From jmspeex on irc:
You should only ever call skip zeros before sending any samples
if you merely change the rate, you should not call it again.
It may be necessary to change the dopper effect through a PannerNode to cause this.
Reporter | ||
Comment 1•11 years ago
|
||
See also the first paragraph of bug 886381 comment 2.
I suspect calling speex_resampler_skip_zeros() after speex_resampler_init() would be a more appropriate place.
Comment 2•11 years ago
|
||
(In reply to Karl Tomlinson (:karlt) from comment #0)
> http://hg.mozilla.org/mozilla-central/annotate/c87a950e1a09/content/media/
> webaudio/AudioBufferSourceNode.cpp#l346
>
> From jmspeex on irc:
> You should only ever call skip zeros before sending any samples
> if you merely change the rate, you should not call it again.
So, should we just move this call to AudioBufferSourceNodeEngine::Resampler() right after we create a resampler?
> It may be necessary to change the dopper effect through a PannerNode to
> cause this.
Not sure what this means...
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #2)
> So, should we just move this call to
> AudioBufferSourceNodeEngine::Resampler() right after we create a resampler?
Yes.
> > It may be necessary to change the dopper effect through a PannerNode to
> > cause this.
>
> Not sure what this means...
This comment was meant to be about reproducing/testing.
I suspect speex_resampler_skip_zeros() is currently only called midstream if the output sample rate changes, and the only way I know for that to happen is through changing velocity vectors.
Comment 4•11 years ago
|
||
(In reply to comment #3)
> (In reply to :Ehsan Akhgari (needinfo? me!) from comment #2)
> > So, should we just move this call to
> > AudioBufferSourceNodeEngine::Resampler() right after we create a resampler?
>
> Yes.
Sounds good to me! Would you like to take this?
> > > It may be necessary to change the dopper effect through a PannerNode to
> > > cause this.
> >
> > Not sure what this means...
>
> This comment was meant to be about reproducing/testing.
Ah, I see!
> I suspect speex_resampler_skip_zeros() is currently only called midstream if
> the output sample rate changes,
Correct.
> and the only way I know for that to happen is
> through changing velocity vectors.
The other way you can trigger that is by changing AudioBufferSourceNode.playbackRate.
Reporter | ||
Comment 5•11 years ago
|
||
Happy to take this, but I'm prioritizing HRTF now. Just leaving notes so things don't get forgotten.
Assignee: nobody → karlt
Comment 6•11 years ago
|
||
(In reply to comment #5)
> Happy to take this, but I'm prioritizing HRTF now. Just leaving notes so
> things don't get forgotten.
Sounds good, thanks!
Assignee | ||
Comment 7•11 years ago
|
||
With the code as it is, and when we are using automation on playbackRate (for
example, on the wubwubwub demo), we have a terrible sound quality. Merely
removing the call make everything work just fine.
Attachment #774632 -
Flags: review?(ehsan)
Assignee | ||
Updated•11 years ago
|
Assignee: karlt → paul
Updated•11 years ago
|
status-firefox24:
--- → affected
status-firefox25:
--- → affected
tracking-firefox24:
--- → ?
tracking-firefox25:
--- → ?
Whiteboard: [blocking-webaudio+]
Updated•11 years ago
|
Attachment #774632 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Comment 10•11 years ago
|
||
I'm not going to get to this today and mcMerge is going to clobber then checkin-needed when this lands on m-c.
Whiteboard: [blocking-webaudio+] → [blocking-webaudio+][checkin-needed-aurora]
Updated•11 years ago
|
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•11 years ago
|
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [blocking-webaudio+][checkin-needed-aurora] → [blocking-webaudio+]
Comment 13•11 years ago
|
||
Assuming this doesn't need QA.
Whiteboard: [blocking-webaudio+] → [blocking-webaudio+][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•