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: Source/modules/webaudio/AudioParam.h

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioContext.idl ('k') | Source/modules/webaudio/BiquadFilterNode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 12 matching lines...) Expand all
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef AudioParam_h 29 #ifndef AudioParam_h
30 #define AudioParam_h 30 #define AudioParam_h
31 31
32 #include "bindings/core/v8/ScriptWrappable.h" 32 #include "bindings/core/v8/ScriptWrappable.h"
33 #include "core/dom/DOMTypedArray.h"
33 #include "modules/webaudio/AudioContext.h" 34 #include "modules/webaudio/AudioContext.h"
34 #include "modules/webaudio/AudioParamTimeline.h" 35 #include "modules/webaudio/AudioParamTimeline.h"
35 #include "modules/webaudio/AudioSummingJunction.h" 36 #include "modules/webaudio/AudioSummingJunction.h"
36 #include <sys/types.h>
37 #include "wtf/Float32Array.h"
38 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
39 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 #include <sys/types.h>
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class AudioNodeOutput; 43 class AudioNodeOutput;
44 44
45 class AudioParam final : public AudioSummingJunction, public ScriptWrappable { 45 class AudioParam final : public AudioSummingJunction, public ScriptWrappable {
46 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
47 public: 47 public:
48 static const double DefaultSmoothingConstant; 48 static const double DefaultSmoothingConstant;
49 static const double SnapThreshold; 49 static const double SnapThreshold;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 m_timeline.linearRampToValueAtTime(value, time, exceptionState); 88 m_timeline.linearRampToValueAtTime(value, time, exceptionState);
89 } 89 }
90 void exponentialRampToValueAtTime(float value, double time, ExceptionState& es) 90 void exponentialRampToValueAtTime(float value, double time, ExceptionState& es)
91 { 91 {
92 m_timeline.exponentialRampToValueAtTime(value, time, es); 92 m_timeline.exponentialRampToValueAtTime(value, time, es);
93 } 93 }
94 void setTargetAtTime(float target, double time, double timeConstant, Excepti onState& exceptionState) 94 void setTargetAtTime(float target, double time, double timeConstant, Excepti onState& exceptionState)
95 { 95 {
96 m_timeline.setTargetAtTime(target, time, timeConstant, exceptionState); 96 m_timeline.setTargetAtTime(target, time, timeConstant, exceptionState);
97 } 97 }
98 void setValueCurveAtTime(Float32Array* curve, double time, double duration, ExceptionState& exceptionState) 98 void setValueCurveAtTime(DOMFloat32Array* curve, double time, double duratio n, ExceptionState& exceptionState)
99 { 99 {
100 m_timeline.setValueCurveAtTime(curve, time, duration, exceptionState); 100 m_timeline.setValueCurveAtTime(curve->view(), time, duration, exceptionS tate);
101 } 101 }
102 void cancelScheduledValues(double startTime, ExceptionState& exceptionState) 102 void cancelScheduledValues(double startTime, ExceptionState& exceptionState)
103 { 103 {
104 m_timeline.cancelScheduledValues(startTime, exceptionState); 104 m_timeline.cancelScheduledValues(startTime, exceptionState);
105 } 105 }
106 106
107 bool hasSampleAccurateValues() { return m_timeline.hasValues() || numberOfRe nderingConnections(); } 107 bool hasSampleAccurateValues() { return m_timeline.hasValues() || numberOfRe nderingConnections(); }
108 108
109 // Calculates numberOfValues parameter values starting at the context's curr ent time. 109 // Calculates numberOfValues parameter values starting at the context's curr ent time.
110 // Must be called in the context's render thread. 110 // Must be called in the context's render thread.
(...skipping 19 matching lines...) Expand all
130 130
131 // Smoothing (de-zippering) 131 // Smoothing (de-zippering)
132 double m_smoothedValue; 132 double m_smoothedValue;
133 133
134 AudioParamTimeline m_timeline; 134 AudioParamTimeline m_timeline;
135 }; 135 };
136 136
137 } // namespace blink 137 } // namespace blink
138 138
139 #endif // AudioParam_h 139 #endif // AudioParam_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioContext.idl ('k') | Source/modules/webaudio/BiquadFilterNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698