diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/webaudio/WaveShaperNode.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/Modules/webaudio/WaveShaperNode.h')
-rw-r--r-- | Source/WebCore/Modules/webaudio/WaveShaperNode.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/Source/WebCore/Modules/webaudio/WaveShaperNode.h b/Source/WebCore/Modules/webaudio/WaveShaperNode.h index cb65372a1..773c04fc0 100644 --- a/Source/WebCore/Modules/webaudio/WaveShaperNode.h +++ b/Source/WebCore/Modules/webaudio/WaveShaperNode.h @@ -22,38 +22,35 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WaveShaperNode_h -#define WaveShaperNode_h +#pragma once #include "AudioBasicProcessorNode.h" -#include "BiquadProcessor.h" #include "WaveShaperProcessor.h" #include <wtf/Forward.h> namespace WebCore { - -class WaveShaperNode : public AudioBasicProcessorNode { + +class WaveShaperNode final : public AudioBasicProcessorNode { public: - static PassRefPtr<WaveShaperNode> create(AudioContext* context) + static Ref<WaveShaperNode> create(AudioContext& context) { - return adoptRef(new WaveShaperNode(context)); + return adoptRef(*new WaveShaperNode(context)); } // setCurve() is called on the main thread. - void setCurve(Float32Array*); + void setCurve(Float32Array&); Float32Array* curve(); - void setOversample(const String& , ExceptionCode&); - String oversample() const; + enum class OverSampleType { None, _2x, _4x }; + void setOversample(OverSampleType); + OverSampleType oversample() const; double latency() const { return latencyTime(); } private: - explicit WaveShaperNode(AudioContext*); + explicit WaveShaperNode(AudioContext&); WaveShaperProcessor* waveShaperProcessor() { return static_cast<WaveShaperProcessor*>(processor()); } }; } // namespace WebCore - -#endif // WaveShaperNode_h |