Closed Bug 868485 Opened 11 years ago Closed 11 years ago

Implement the mixToMono behavior for createBuffer

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Attached patch Part 1: implementation (obsolete) (deleted) — 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>
(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.
Attached patch Part 1: implementation (deleted) — Splinter Review
Attachment #745461 - Attachment is obsolete: true
Attachment #745461 - Flags: review?(roc)
Attachment #745551 - Flags: review?(roc)
Attached patch Part 2: Testcase (deleted) — Splinter Review
Attachment #745552 - Flags: review?(roc)
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
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
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.

Attachment

General

Created:
Updated:
Size: