Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h

Issue 2102133002: Add constructors for WebAudio nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and prefix use counter names with WebAudio Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #define WaveShaperNode_h 26 #define WaveShaperNode_h
27 27
28 #include "core/dom/DOMTypedArray.h" 28 #include "core/dom/DOMTypedArray.h"
29 #include "modules/webaudio/AudioNode.h" 29 #include "modules/webaudio/AudioNode.h"
30 #include "modules/webaudio/WaveShaperProcessor.h" 30 #include "modules/webaudio/WaveShaperProcessor.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class BaseAudioContext; 34 class BaseAudioContext;
35 class ExceptionState; 35 class ExceptionState;
36 class WaveShaperOptions;
36 37
37 class WaveShaperNode final : public AudioNode { 38 class WaveShaperNode final : public AudioNode {
38 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
39 public: 40 public:
40 static WaveShaperNode* create(BaseAudioContext&, ExceptionState&); 41 static WaveShaperNode* create(BaseAudioContext&, ExceptionState&);
42 static WaveShaperNode* create(BaseAudioContext*, const WaveShaperOptions&, E xceptionState&);
41 43
42 // setCurve() is called on the main thread. 44 // setCurve() is called on the main thread.
43 void setCurve(DOMFloat32Array*, ExceptionState&); 45 void setCurve(DOMFloat32Array*, ExceptionState&);
46 void setCurve(const Vector<float>&, ExceptionState&);
44 DOMFloat32Array* curve(); 47 DOMFloat32Array* curve();
45 48
46 void setOversample(const String&); 49 void setOversample(const String&);
47 String oversample() const; 50 String oversample() const;
48 51
49 private: 52 private:
50 explicit WaveShaperNode(BaseAudioContext&); 53 explicit WaveShaperNode(BaseAudioContext&);
51 54
55 void setCurveImpl(const float* curveData, unsigned curveLength, ExceptionSta te&);
52 WaveShaperProcessor* getWaveShaperProcessor() const; 56 WaveShaperProcessor* getWaveShaperProcessor() const;
53 }; 57 };
54 58
55 } // namespace blink 59 } // namespace blink
56 60
57 #endif // WaveShaperNode_h 61 #endif // WaveShaperNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698