Add multi channels support in AudioBus and AudioBufferSourceNode
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Feb 2012 04:51:43 +0000 (04:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Feb 2012 04:51:43 +0000 (04:51 +0000)
commitc09e207bdc5005235cfcfe8399ace77eb1c22418
treec3f2e80d7182b784a9ce28a3a80745d51a4f1baf
parent48e43f69762e83a8d68fca5c0e98d2fede3a72da
Add multi channels support in AudioBus and AudioBufferSourceNode
https://bugs.webkit.org/show_bug.cgi?id=79017

Patch by Wei James <james.wei@intel.com> on 2012-02-22
Reviewed by Chris Rogers.

Source/WebCore:

Tests: webaudio/up-mixing-mono-51.html
       webaudio/up-mixing-mono-stereo.html
       webaudio/up-mixing-stereo-51.html

* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::copyFrom):
(WebCore::AudioBus::sumFrom):
(WebCore::AudioBus::processWithGainFromMonoStereo):
(WebCore::AudioBus::processWithGainFrom):

LayoutTests:

* webaudio/resources/audio-testing.js:
(writeAudioBuffer):
* webaudio/resources/mix-testing.js: Added.
(createToneBuffer):
* webaudio/up-mixing-mono-51-expected.wav: Added.
* webaudio/up-mixing-mono-51.html: Added.
* webaudio/up-mixing-mono-stereo-expected.wav: Added.
* webaudio/up-mixing-mono-stereo.html: Added.
* webaudio/up-mixing-stereo-51-expected.wav: Added.
* webaudio/up-mixing-stereo-51.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webaudio/resources/audio-testing.js
LayoutTests/webaudio/resources/mix-testing.js [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-mono-51-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-mono-51.html [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-mono-stereo-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-mono-stereo.html [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-stereo-51-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/up-mixing-stereo-51.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/AudioBus.cpp