OLD | NEW |
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 11 matching lines...) Expand all Loading... |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
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 <sys/types.h> | |
33 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
34 #include "core/dom/DOMTypedArray.h" | 33 #include "core/dom/DOMTypedArray.h" |
35 #include "core/dom/NotShared.h" | |
36 #include "modules/webaudio/AudioParamTimeline.h" | 34 #include "modules/webaudio/AudioParamTimeline.h" |
37 #include "modules/webaudio/AudioSummingJunction.h" | 35 #include "modules/webaudio/AudioSummingJunction.h" |
38 #include "modules/webaudio/BaseAudioContext.h" | 36 #include "modules/webaudio/BaseAudioContext.h" |
39 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
40 #include "wtf/ThreadSafeRefCounted.h" | 38 #include "wtf/ThreadSafeRefCounted.h" |
41 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| 40 #include <sys/types.h> |
42 | 41 |
43 namespace blink { | 42 namespace blink { |
44 | 43 |
45 class AudioNodeOutput; | 44 class AudioNodeOutput; |
46 | 45 |
47 // Each AudioParam gets an identifier here. This is mostly for instrospection | 46 // Each AudioParam gets an identifier here. This is mostly for instrospection |
48 // if warnings or other messages need to be printed. It's useful to know what | 47 // if warnings or other messages need to be printed. It's useful to know what |
49 // the AudioParam represents. The name should include the node type and the | 48 // the AudioParam represents. The name should include the node type and the |
50 // name of the AudioParam. | 49 // name of the AudioParam. |
51 enum AudioParamType { | 50 enum AudioParamType { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 AudioParam* linearRampToValueAtTime(float value, | 239 AudioParam* linearRampToValueAtTime(float value, |
241 double time, | 240 double time, |
242 ExceptionState&); | 241 ExceptionState&); |
243 AudioParam* exponentialRampToValueAtTime(float value, | 242 AudioParam* exponentialRampToValueAtTime(float value, |
244 double time, | 243 double time, |
245 ExceptionState&); | 244 ExceptionState&); |
246 AudioParam* setTargetAtTime(float target, | 245 AudioParam* setTargetAtTime(float target, |
247 double time, | 246 double time, |
248 double time_constant, | 247 double time_constant, |
249 ExceptionState&); | 248 ExceptionState&); |
250 AudioParam* setValueCurveAtTime(NotShared<DOMFloat32Array> curve, | 249 AudioParam* setValueCurveAtTime(DOMFloat32Array* curve, |
251 double time, | 250 double time, |
252 double duration, | 251 double duration, |
253 ExceptionState&); | 252 ExceptionState&); |
254 AudioParam* cancelScheduledValues(double start_time, ExceptionState&); | 253 AudioParam* cancelScheduledValues(double start_time, ExceptionState&); |
255 AudioParam* cancelAndHoldAtTime(double start_time, ExceptionState&); | 254 AudioParam* cancelAndHoldAtTime(double start_time, ExceptionState&); |
256 | 255 |
257 private: | 256 private: |
258 AudioParam(BaseAudioContext&, | 257 AudioParam(BaseAudioContext&, |
259 AudioParamType, | 258 AudioParamType, |
260 double default_value, | 259 double default_value, |
261 float min, | 260 float min, |
262 float max); | 261 float max); |
263 | 262 |
264 void WarnIfOutsideRange(const String& param_methd, float value); | 263 void WarnIfOutsideRange(const String& param_methd, float value); |
265 | 264 |
266 RefPtr<AudioParamHandler> handler_; | 265 RefPtr<AudioParamHandler> handler_; |
267 Member<BaseAudioContext> context_; | 266 Member<BaseAudioContext> context_; |
268 }; | 267 }; |
269 | 268 |
270 } // namespace blink | 269 } // namespace blink |
271 | 270 |
272 #endif // AudioParam_h | 271 #endif // AudioParam_h |
OLD | NEW |