Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Multi-Channel support in AudioBufferSourceNode
https://bugs.webkit.org/show_bug.cgi?id=79202 Patch by Wei James <james.wei@intel.com> on 2012-02-27 Reviewed by Chris Rogers. Source/WebCore: Test: webaudio/audiobuffersource-multi-channels.html * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping): (WebCore::AudioBufferSourceNode::renderFromBuffer): (WebCore::AudioBufferSourceNode::setBuffer): * webaudio/AudioBufferSourceNode.h: (AudioBufferSourceNode): LayoutTests: * webaudio/audiobuffersource-channels-expected.txt: * webaudio/audiobuffersource-channels.html: * webaudio/audiobuffersource-multi-channels-expected.wav: Added. * webaudio/audiobuffersource-multi-channels.html: Added. Canonical link: https://commits.webkit.org/96837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
126 additions
and 64 deletions.
- +12 −0 LayoutTests/ChangeLog
- +7 −7 LayoutTests/webaudio/audiobuffersource-channels-expected.txt
- +5 −6 LayoutTests/webaudio/audiobuffersource-channels.html
- BIN LayoutTests/webaudio/audiobuffersource-multi-channels-expected.wav
- +43 −0 LayoutTests/webaudio/audiobuffersource-multi-channels.html
- +16 −0 Source/WebCore/ChangeLog
- +36 −50 Source/WebCore/webaudio/AudioBufferSourceNode.cpp
- +7 −1 Source/WebCore/webaudio/AudioBufferSourceNode.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE html> | ||
|
||
<!-- | ||
Test AudioBufferSourceNode supports 5.1 channel. | ||
--> | ||
|
||
<html> | ||
<head> | ||
<script type="text/javascript" src="resources/audio-testing.js"></script> | ||
<script type="text/javascript" src="resources/mix-testing.js"></script> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
|
||
function runTest() { | ||
if (!window.layoutTestController) | ||
return; | ||
|
||
layoutTestController.waitUntilDone(); | ||
|
||
window.jsTestAsync = true; | ||
|
||
// Create offline audio context | ||
var sampleRate = 44100.0; | ||
var context = new webkitAudioContext(6, sampleRate * renderLengthSeconds, sampleRate); | ||
var toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 6); | ||
|
||
var source = context.createBufferSource(); | ||
source.buffer = toneBuffer; | ||
|
||
source.connect(context.destination); | ||
source.noteOn(0); | ||
|
||
context.oncomplete = finishAudioTest; | ||
context.startRendering(); | ||
} | ||
|
||
runTest(); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters