Closed
Bug 857610
Opened 12 years ago
Closed 11 years ago
Handle channel count changes in delay node
Categories
(Core :: Web Audio, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: ehsan.akhgari, Assigned: karlt)
References
(Blocks 1 open bug)
Details
(Whiteboard: [blocking-webaudio-])
Attachments
(5 files, 3 obsolete files)
(deleted),
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
Follow-up from bug 853721.
Reporter | ||
Updated•12 years ago
|
Reporter | ||
Comment 1•11 years ago
|
||
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
Assignee | ||
Comment 2•11 years ago
|
||
I've written a post for public-audio, but I'm waiting for <87ob8p0zvi.fsf@karlt.net>, send just now, to appear in the archives, so I can reference that.
Assignee | ||
Comment 3•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Whiteboard: [blocking-webaudio-]
Updated•11 years ago
|
Priority: -- → P2
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → karlt
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•11 years ago
|
||
I'd like to separate writing to and reading from the delay buffer for bug 932400, and the names for Read() and Write() methods make more sense if this is called "buffer" rather than "processor".
Attachment #8381958 -
Flags: review?(paul)
Assignee | ||
Comment 5•11 years ago
|
||
A subsequent patch will write the whole inputBus AudioChunk to the DelayBuffer in one call, which would make this loop seem more silly.
Attachment #8381963 -
Flags: review?(paul)
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Simplifying a little before a rewrite of DelayBuffer.
Attachment #8381967 -
Flags: review?(paul)
Assignee | ||
Comment 8•11 years ago
|
||
The basic idea is to write out the signal that came in with the same number of channels it had as when it came in. Things get a bit more complicated when one output block may be derived from more than one input block, each having different numbers of channels. When this happens, the input blocks with fewer channels are upsampled, so as not to lose (or distort) any signal in the block with more channels.
Handling channel count changes required a rewrite of the core code, so this version includes the separate read and write for bug 932400.
HRTFPanner no longer uses exponential decay (with time constant 20ms) for
delay changes, but a smoother linear transition during cross-fade time (~45s).
Attachment #8381982 -
Flags: review?(paul)
Comment 9•11 years ago
|
||
Comment on attachment 8381958 [details] [diff] [review]
rename DelayProcessor to DelayBuffer
Review of attachment 8381958 [details] [diff] [review]:
-----------------------------------------------------------------
Makes sense.
Attachment #8381958 -
Flags: review?(paul) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Working around bug 976927, adding some necessary includes provided only by unified_sources, and a stray initialization on a member declaration.
https://tbpl.mozilla.org/?tree=Try&rev=37c07c746c27
and some other platforms on the previous version:
https://tbpl.mozilla.org/?tree=Try&rev=aabd32aa9d0d
Attachment #8381982 -
Attachment is obsolete: true
Attachment #8381982 -
Flags: review?(paul)
Assignee | ||
Updated•11 years ago
|
Attachment #8382710 -
Flags: review?(paul)
Updated•11 years ago
|
Attachment #8381967 -
Flags: review?(paul) → review+
Updated•11 years ago
|
Attachment #8381963 -
Flags: review?(paul) → review+
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 8382710 [details] [diff] [review]
part 4 v1.1: handle DelayNode channel count changes and separate buffer read and write
Will fix a couple of bugs here.
Attachment #8382710 -
Flags: review?(paul)
Assignee | ||
Comment 12•11 years ago
|
||
Handle null buffer on allocation failure and change the public API a little to
simplify and clarify differences in Read methods.
Add NextBlock call in HRTF panner.
Invalidate upmix cache when channel count changes, but read chunk stays the
same.
Try runs with new test cases for this bug and the HRTF panner bug in previous patch.
https://tbpl.mozilla.org/?tree=Try&rev=0a89e4f5fc80
https://tbpl.mozilla.org/?tree=Try&rev=6862e80dd11c
Attachment #8382710 -
Attachment is obsolete: true
Attachment #8383490 -
Flags: review?(paul)
Assignee | ||
Updated•11 years ago
|
Attachment #8383490 -
Flags: review?(paul)
Assignee | ||
Comment 13•11 years ago
|
||
Fixed more bugs:
mVolume was being used uninitialized when default initialized null chunks were
read from the delay buffer. This was multiplied by zero, and so usually
didn't cause problems, but sometimes it could be multiplied by inf or NaN
producing NaNs in the output.
The OOM path in ReadChannel() for pre-allocated AudioChunks, in the previous
patch, was bad.
Attachment #8383490 -
Attachment is obsolete: true
Attachment #8383574 -
Flags: review?(paul)
Comment 14•11 years ago
|
||
Comment on attachment 8383574 [details] [diff] [review]
part 4 v1.3: handle DelayNode channel count changes and separate buffer read and write
Review of attachment 8383574 [details] [diff] [review]:
-----------------------------------------------------------------
s/the input blocks with fewer channels are upsampled/the input blocks with fewer channels are upmixed/, in the commit message.
Comment 15•11 years ago
|
||
Comment on attachment 8383574 [details] [diff] [review]
part 4 v1.3: handle DelayNode channel count changes and separate buffer read and write
Review of attachment 8383574 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/webaudio/DelayBuffer.cpp
@@ +114,5 @@
> + channel < readChannelsEnd; ++channel) {
> + PodZero(outputChannels[channel], WEBAUDIO_BLOCK_SIZE);
> + }
> +
> + for (unsigned i = 0; i < WEBAUDIO_BLOCK_SIZE; ++i) {
It's kind of sad that we have the two loops in this order, but the alternative might not be worth it, this is complicated enough as it is.
Attachment #8383574 -
Flags: review?(paul) → review+
Assignee | ||
Comment 16•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5fc25fe40e86
https://hg.mozilla.org/integration/mozilla-inbound/rev/250a096dce5b
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd48309a636f
https://hg.mozilla.org/integration/mozilla-inbound/rev/f4660eb6ca99
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7c60d3b2732
The HRTF panner test is labelled with bug 865241.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f814a1a08de6
Flags: in-testsuite+
Comment 17•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5fc25fe40e86
https://hg.mozilla.org/mozilla-central/rev/250a096dce5b
https://hg.mozilla.org/mozilla-central/rev/bd48309a636f
https://hg.mozilla.org/mozilla-central/rev/f4660eb6ca99
https://hg.mozilla.org/mozilla-central/rev/c7c60d3b2732
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•