Implement OfflineAudioContext constructor
authorcrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 01:42:43 +0000 (01:42 +0000)
committercrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 01:42:43 +0000 (01:42 +0000)
commit786c01f4ef0f6a8341d18a6be1bd6ce7d5563c1c
tree97f2d646db395061cd2c8d573368c33c329ed201
parent5c9db8f24c04ac5d966219956fc288a97e6eb0bc
Implement OfflineAudioContext constructor
https://bugs.webkit.org/show_bug.cgi?id=104188

Reviewed by Kentaro Hara.

Source/WebCore:

The Web Audio layout tests have relied on an undocumented way (in the specification) to render
audio faster than realtime using an OfflineAudioContext.  We want to expose a proper OfflineAudioContext
object and constructor instead of piggybacking off of the normal AudioContext.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isSampleRateRangeGood):
* Modules/webaudio/AudioContext.h:
(AudioContext):
* Modules/webaudio/DOMWindowWebAudio.idl:
* Modules/webaudio/OfflineAudioContext.cpp: Added.
(WebCore):
(WebCore::OfflineAudioContext::create):
(WebCore::OfflineAudioContext::OfflineAudioContext):
(WebCore::OfflineAudioContext::~OfflineAudioContext):
* Modules/webaudio/OfflineAudioContext.h: Added.
(WebCore):
(OfflineAudioContext):
* Modules/webaudio/OfflineAudioContext.idl: Added.
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitOfflineAudioContextEnabled):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallbackCustom):

LayoutTests:

Switch Web Audio layout tests to use OfflineAudioContext constructor.

* inspector-protocol/nmi-webaudio.html:
* inspector-protocol/resources/audio-context.html:
* webaudio/audiobuffersource-loop-comprehensive.html:
* webaudio/audiobuffersource-loop-points.html:
* webaudio/audiobuffersource-multi-channels.html:
* webaudio/audiobuffersource-playbackState.html:
* webaudio/audiobuffersource-playbackrate.html:
* webaudio/audiobuffersource-start.html:
* webaudio/audiobuffersource.html:
* webaudio/audiochannelmerger-stereo.html:
* webaudio/audiochannelsplitter.html:
* webaudio/audionode-connect-order.html:
* webaudio/audionode-expected.txt:
* webaudio/audioparam-connect-audioratesignal.html:
* webaudio/audioparam-summingjunction.html:
* webaudio/automatic-pull-node.html:
* webaudio/biquad-allpass.html:
* webaudio/biquad-bandpass.html:
* webaudio/biquad-highpass.html:
* webaudio/biquad-highshelf.html:
* webaudio/biquad-lowpass.html:
* webaudio/biquad-lowshelf.html:
* webaudio/biquad-notch.html:
* webaudio/biquad-peaking.html:
* webaudio/convolution-mono-mono.html:
* webaudio/delaynode-max-default-delay.html:
* webaudio/delaynode-max-nondefault-delay.html:
* webaudio/delaynode-maxdelay.html:
* webaudio/delaynode-maxdelaylimit.html:
* webaudio/delaynode-scheduling.html:
* webaudio/delaynode.html:
* webaudio/distance-exponential.html:
* webaudio/distance-inverse.html:
* webaudio/distance-linear.html:
* webaudio/gain.html:
* webaudio/javascriptaudionode-zero-input-channels.html:
* webaudio/javascriptaudionode.html:
* webaudio/mediaelementaudiosourcenode-gc.html:
* webaudio/mixing.html:
* webaudio/note-grain-on-play.html:
* webaudio/note-grain-on-timing.html:
* webaudio/oscillator-basic.html:
* webaudio/panner-equalpower-stereo.html:
* webaudio/panner-equalpower.html:
* webaudio/realtimeanalyser-fft-sizing.html:
* webaudio/resources/audio-codec-test.js:
(runDecodingTest):
* webaudio/resources/audioparam-testing.js:
(createAudioGraphAndTest):
* webaudio/resources/javascriptaudionode-testing.js:
(runJSNodeTest):
* webaudio/sample-accurate-scheduling.html:
* webaudio/stereo2mono-down-mixing.html:
* webaudio/up-mixing-mono-51.html:
* webaudio/up-mixing-mono-stereo.html:
* webaudio/up-mixing-stereo-51.html:
* webaudio/waveshaper.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
71 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/nmi-webaudio.html
LayoutTests/inspector-protocol/resources/audio-context.html
LayoutTests/webaudio/audiobuffersource-loop-comprehensive.html
LayoutTests/webaudio/audiobuffersource-loop-points.html
LayoutTests/webaudio/audiobuffersource-multi-channels.html
LayoutTests/webaudio/audiobuffersource-playbackState.html
LayoutTests/webaudio/audiobuffersource-playbackrate.html
LayoutTests/webaudio/audiobuffersource-start.html
LayoutTests/webaudio/audiobuffersource.html
LayoutTests/webaudio/audiochannelmerger-stereo.html
LayoutTests/webaudio/audiochannelsplitter.html
LayoutTests/webaudio/audionode-connect-order.html
LayoutTests/webaudio/audionode-expected.txt
LayoutTests/webaudio/audioparam-connect-audioratesignal.html
LayoutTests/webaudio/audioparam-summingjunction.html
LayoutTests/webaudio/automatic-pull-node.html
LayoutTests/webaudio/biquad-allpass.html
LayoutTests/webaudio/biquad-bandpass.html
LayoutTests/webaudio/biquad-highpass.html
LayoutTests/webaudio/biquad-highshelf.html
LayoutTests/webaudio/biquad-lowpass.html
LayoutTests/webaudio/biquad-lowshelf.html
LayoutTests/webaudio/biquad-notch.html
LayoutTests/webaudio/biquad-peaking.html
LayoutTests/webaudio/convolution-mono-mono.html
LayoutTests/webaudio/delaynode-max-default-delay.html
LayoutTests/webaudio/delaynode-max-nondefault-delay.html
LayoutTests/webaudio/delaynode-maxdelay.html
LayoutTests/webaudio/delaynode-maxdelaylimit.html
LayoutTests/webaudio/delaynode-scheduling.html
LayoutTests/webaudio/delaynode.html
LayoutTests/webaudio/distance-exponential.html
LayoutTests/webaudio/distance-inverse.html
LayoutTests/webaudio/distance-linear.html
LayoutTests/webaudio/gain.html
LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html
LayoutTests/webaudio/javascriptaudionode.html
LayoutTests/webaudio/mediaelementaudiosourcenode-gc.html
LayoutTests/webaudio/mixing.html
LayoutTests/webaudio/note-grain-on-play.html
LayoutTests/webaudio/note-grain-on-timing.html
LayoutTests/webaudio/oscillator-basic.html
LayoutTests/webaudio/panner-equalpower-stereo.html
LayoutTests/webaudio/panner-equalpower.html
LayoutTests/webaudio/realtimeanalyser-fft-sizing.html
LayoutTests/webaudio/resources/audio-codec-test.js
LayoutTests/webaudio/resources/audioparam-testing.js
LayoutTests/webaudio/resources/javascriptaudionode-testing.js
LayoutTests/webaudio/sample-accurate-scheduling.html
LayoutTests/webaudio/stereo2mono-down-mixing.html
LayoutTests/webaudio/up-mixing-mono-51.html
LayoutTests/webaudio/up-mixing-mono-stereo.html
LayoutTests/webaudio/up-mixing-stereo-51.html
LayoutTests/webaudio/waveshaper.html
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/DOMWindowWebAudio.idl
Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp [new file with mode: 0644]
Source/WebCore/Modules/webaudio/OfflineAudioContext.h [new file with mode: 0644]
Source/WebCore/Modules/webaudio/OfflineAudioContext.idl [new file with mode: 0644]
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/bindings/js/JSAudioContextCustom.cpp
Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp