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 24 matching lines...) Expand all Loading... |
35 #include "modules/webaudio/AudioSummingJunction.h" | 35 #include "modules/webaudio/AudioSummingJunction.h" |
36 #include <sys/types.h> | 36 #include <sys/types.h> |
37 #include "wtf/Float32Array.h" | 37 #include "wtf/Float32Array.h" |
38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
39 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.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; |
50 | 50 |
51 static AudioParam* create(AudioContext* context, double defaultValue) | 51 static AudioParam* create(AudioContext* context, double defaultValue) |
52 { | 52 { |
53 return new AudioParam(context, defaultValue); | 53 return new AudioParam(context, defaultValue); |
54 } | 54 } |
55 | 55 |
56 // AudioSummingJunction | 56 // AudioSummingJunction |
57 virtual void didUpdate() OVERRIDE { } | 57 virtual void didUpdate() override { } |
58 | 58 |
59 // Intrinsic value. | 59 // Intrinsic value. |
60 float value(); | 60 float value(); |
61 void setValue(float); | 61 void setValue(float); |
62 | 62 |
63 // Final value for k-rate parameters, otherwise use calculateSampleAccurateV
alues() for a-rate. | 63 // Final value for k-rate parameters, otherwise use calculateSampleAccurateV
alues() for a-rate. |
64 // Must be called in the audio thread. | 64 // Must be called in the audio thread. |
65 float finalValue(); | 65 float finalValue(); |
66 | 66 |
67 float defaultValue() const { return static_cast<float>(m_defaultValue); } | 67 float defaultValue() const { return static_cast<float>(m_defaultValue); } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |