Closed
Bug 865247
Opened 12 years ago
Closed 12 years ago
Implement ChannelSplitterNode
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(4 files, 6 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Kevin wants this, so I'm going to implement it. Should be pretty easy.
Assignee: nobody → ehsan
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #745444 -
Flags: review?(roc)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #745445 -
Flags: review?(roc)
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #745448 -
Flags: review?(roc)
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #745449 -
Flags: review?(roc)
Assignee | ||
Comment 6•12 years ago
|
||
Bobby, this is the patch series which will change the ProduceAudioBlock API, in case you're curious. Look at part 3 to see how you need to change your implementation -- should be pretty simple.
Attachment #745444 -
Flags: review?(roc) → review+
Actually it looks like the input and output numbers could be uint16_t.
Attachment #745445 -
Flags: review?(roc) → review+
Comment on attachment 745448 [details] [diff] [review]
Part 3: Change the ProduceAudioBlock to make it aware of multiple input and output ports for simultaneous processing
Review of attachment 745448 [details] [diff] [review]:
-----------------------------------------------------------------
Since Channel*Nodes are the only ones that take more than one numbered input/output I wonder whether it would be better to avoid modifying the ProduceAudioBlock API.
We could keep the existing single input/output virtual method and add a separate method for multi-input/output, calling the former when there's only one input and output.
::: content/media/AudioNodeStream.cpp
@@ +242,5 @@
> +{
> + uint32_t inputCount = mInputs.Length();
> + uint32_t maxInputPort = 0;
> + for (uint32_t i = 0; i < inputCount; ++i) {
> + maxInputPort = std::max(maxInputPort, mInputs[i]->InputNumber());
Looping over the input ports isn't good. Why not just copy the maximum number of inputs and outputs into the AudioNodeEngine and access it directly?
::: content/media/webaudio/ScriptProcessorNode.cpp
@@ +184,5 @@
>
> virtual void ProduceAudioBlock(AudioNodeStream* aStream,
> + const OutputChunks& aInput,
> + OutputChunks& aOutput,
> + bool* aFinished)
Why are you removing MOZ_OVERRIDE?
Attachment #745449 -
Flags: review?(roc) → review+
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #8)
> Comment on attachment 745448 [details] [diff] [review]
> Part 3: Change the ProduceAudioBlock to make it aware of multiple input and
> output ports for simultaneous processing
>
> Review of attachment 745448 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Since Channel*Nodes are the only ones that take more than one numbered
> input/output I wonder whether it would be better to avoid modifying the
> ProduceAudioBlock API.
>
> We could keep the existing single input/output virtual method and add a
> separate method for multi-input/output, calling the former when there's only
> one input and output.
Before calling ProduceAudioBlock API we don't know if the engine will produce multiple outputs, so while this could work for channel merger since we will have multiple input ports, it won't work for channel splitter. I guess I can add a bool flag to AudioNodeEngine and set it to true for splitters and mergers and use that to decide which API to call. Does that sound good?
> ::: content/media/AudioNodeStream.cpp
> @@ +242,5 @@
> > +{
> > + uint32_t inputCount = mInputs.Length();
> > + uint32_t maxInputPort = 0;
> > + for (uint32_t i = 0; i < inputCount; ++i) {
> > + maxInputPort = std::max(maxInputPort, mInputs[i]->InputNumber());
>
> Looping over the input ports isn't good. Why not just copy the maximum
> number of inputs and outputs into the AudioNodeEngine and access it directly?
OK, I can do that. Actually that takes care of what I said above as well.
> ::: content/media/webaudio/ScriptProcessorNode.cpp
> @@ +184,5 @@
> >
> > virtual void ProduceAudioBlock(AudioNodeStream* aStream,
> > + const OutputChunks& aInput,
> > + OutputChunks& aOutput,
> > + bool* aFinished)
>
> Why are you removing MOZ_OVERRIDE?
My mistake.
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #745444 -
Attachment is obsolete: true
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #745445 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #745448 -
Attachment is obsolete: true
Attachment #745448 -
Flags: review?(roc)
Attachment #745547 -
Flags: review?(roc)
Assignee | ||
Comment 13•12 years ago
|
||
Attachment #745449 -
Attachment is obsolete: true
Assignee | ||
Comment 14•12 years ago
|
||
Forgot to add the test case.
Attachment #745548 -
Attachment is obsolete: true
Attachment #745553 -
Flags: review?(roc)
Assignee | ||
Comment 15•12 years ago
|
||
Attachment #745553 -
Attachment is obsolete: true
Attachment #745553 -
Flags: review?(roc)
Attachment #745559 -
Flags: review?(roc)
Attachment #745547 -
Flags: review?(roc) → review+
Attachment #745559 -
Flags: review?(roc) → review+
Assignee | ||
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Backed out:
https://hg.mozilla.org/integration/mozilla-inbound/rev/397ed6df2ad6
https://hg.mozilla.org/integration/mozilla-inbound/rev/46e41b0f0674
for bustage:
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604557&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604565&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604531&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604521&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604574&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604583&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604596&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604608&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604589&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604636&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=22604626&tree=Mozilla-Inbound
Assignee | ||
Comment 18•12 years ago
|
||
Having two virtual overloads and overriding one of them warns in gcc. I guess I need to rename the new ProduceAudioBlock. :(
Assignee | ||
Comment 19•12 years ago
|
||
Comment 20•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0630975bebd6
https://hg.mozilla.org/mozilla-central/rev/c619b0cb55f0
https://hg.mozilla.org/mozilla-central/rev/d6307d661d41
https://hg.mozilla.org/mozilla-central/rev/ab91fc927a9f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee | ||
Comment 21•11 years ago
|
||
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in
before you can comment on or make changes to this bug.
Description
•