Implement the mixToMono behavior for createBuffer

RESOLVED FIXED in mozilla23

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla23
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Assignee

Description

6 years ago
No description provided.
Assignee

Comment 1

6 years ago
Posted patch Part 1: implementation (obsolete) — Splinter Review
This is the implementation part.  Testing this needs multiple iterations on the try server, and I'll work on that later.
Attachment #745461 - Flags: review?(roc)
Comment on attachment 745461 [details] [diff] [review]
Part 1: implementation

Review of attachment 745461 [details] [diff] [review]:
-----------------------------------------------------------------

Seems to me that instead of going through mSharedChannels you could work on the mJSChannels directly, and be more efficient and maybe simpler?

::: content/media/webaudio/AudioBuffer.cpp
@@ +195,5 @@
> +    channels[i] = mSharedChannels->GetData(i);
> +  }
> +
> +  // Prepare the output channels
> +  float* downmixBuffer = new float[mLength];

nsAutoArrayPtr. Or else ns(Auto)TArray<float>
Assignee

Comment 3

6 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #2)
> ::: content/media/webaudio/AudioBuffer.cpp
> @@ +195,5 @@
> > +    channels[i] = mSharedChannels->GetData(i);
> > +  }
> > +
> > +  // Prepare the output channels
> > +  float* downmixBuffer = new float[mLength];
> 
> nsAutoArrayPtr. Or else ns(Auto)TArray<float>

I can't use these classes, since AudioChannelsDownMix expects a float** and I can't use it with the rvalue float* accessors of these classes.
Assignee

Comment 4

6 years ago
Attachment #745461 - Attachment is obsolete: true
Attachment #745461 - Flags: review?(roc)
Attachment #745551 - Flags: review?(roc)
Assignee

Comment 5

6 years ago
Attachment #745552 - Flags: review?(roc)
Assignee

Comment 6

6 years ago
https://tbpl.mozilla.org/?tree=Try&rev=f9bef74bc83b
https://tbpl.mozilla.org/?tree=Try&rev=dff84f6bff7a

(Note that I might do a few try rounds to adjust the fuzziness numbers in the test, but they shouldn't really require their own review rounds.)
https://hg.mozilla.org/mozilla-central/rev/3370e2c73cea
https://hg.mozilla.org/mozilla-central/rev/f958d3fee49f
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee

Comment 9

6 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.