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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // Connect an audio-rate signal to control this parameter. | 95 // Connect an audio-rate signal to control this parameter. |
96 void connect(AudioNodeOutput&); | 96 void connect(AudioNodeOutput&); |
97 void disconnect(AudioNodeOutput&); | 97 void disconnect(AudioNodeOutput&); |
98 | 98 |
99 private: | 99 private: |
100 AudioParam(AudioContext* context, double defaultValue) | 100 AudioParam(AudioContext* context, double defaultValue) |
101 : AudioSummingJunction(context) | 101 : AudioSummingJunction(context) |
102 , m_value(defaultValue) | 102 , m_value(defaultValue) |
103 , m_defaultValue(defaultValue) | 103 , m_defaultValue(defaultValue) |
104 , m_smoothedValue(defaultValue) | 104 , m_smoothedValue(defaultValue) { } |
105 { | |
106 ScriptWrappable::init(this); | |
107 } | |
108 | 105 |
109 // sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web A
udio specification. | 106 // sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web A
udio specification. |
110 void calculateFinalValues(float* values, unsigned numberOfValues, bool sampl
eAccurate); | 107 void calculateFinalValues(float* values, unsigned numberOfValues, bool sampl
eAccurate); |
111 void calculateTimelineValues(float* values, unsigned numberOfValues); | 108 void calculateTimelineValues(float* values, unsigned numberOfValues); |
112 | 109 |
113 double m_value; | 110 double m_value; |
114 double m_defaultValue; | 111 double m_defaultValue; |
115 | 112 |
116 // Smoothing (de-zippering) | 113 // Smoothing (de-zippering) |
117 double m_smoothedValue; | 114 double m_smoothedValue; |
118 | 115 |
119 AudioParamTimeline m_timeline; | 116 AudioParamTimeline m_timeline; |
120 }; | 117 }; |
121 | 118 |
122 } // namespace blink | 119 } // namespace blink |
123 | 120 |
124 #endif // AudioParam_h | 121 #endif // AudioParam_h |
OLD | NEW |