| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Calculates numberOfValues parameter values starting at the context's curr
ent time. | 121 // Calculates numberOfValues parameter values starting at the context's curr
ent time. |
| 122 // Must be called in the context's render thread. | 122 // Must be called in the context's render thread. |
| 123 void calculateSampleAccurateValues(float* values, unsigned numberOfValues); | 123 void calculateSampleAccurateValues(float* values, unsigned numberOfValues); |
| 124 | 124 |
| 125 // Connect an audio-rate signal to control this parameter. | 125 // Connect an audio-rate signal to control this parameter. |
| 126 void connect(AudioNodeOutput&); | 126 void connect(AudioNodeOutput&); |
| 127 void disconnect(AudioNodeOutput&); | 127 void disconnect(AudioNodeOutput&); |
| 128 | 128 |
| 129 float intrinsicValue() const { return noBarrierLoad(&m_intrinsicValue); } | 129 float intrinsicValue() const { return noBarrierLoad(&m_intrinsicValue); } |
| 130 private: | 130 private: |
| 131 AudioParamHandler(AbstractAudioContext& context, AudioParamType paramType, d
ouble defaultValue) | 131 AudioParamHandler(AbstractAudioContext&, AudioParamType, double defaultValue
); |
| 132 : AudioSummingJunction(context.deferredTaskHandler()) | |
| 133 , m_paramType(paramType) | |
| 134 , m_intrinsicValue(defaultValue) | |
| 135 , m_defaultValue(defaultValue) | |
| 136 , m_smoothedValue(defaultValue) | |
| 137 , m_destinationHandler(context.destination()->audioDestinationHandler()) | |
| 138 { } | |
| 139 | 132 |
| 140 // sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web A
udio specification. | 133 // sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web A
udio specification. |
| 141 void calculateFinalValues(float* values, unsigned numberOfValues, bool sampl
eAccurate); | 134 void calculateFinalValues(float* values, unsigned numberOfValues, bool sampl
eAccurate); |
| 142 void calculateTimelineValues(float* values, unsigned numberOfValues); | 135 void calculateTimelineValues(float* values, unsigned numberOfValues); |
| 143 | 136 |
| 144 // The type of AudioParam, indicating what this AudioParam represents and wh
at node it belongs | 137 // The type of AudioParam, indicating what this AudioParam represents and wh
at node it belongs |
| 145 // to. Mostly for informational purposes and doesn't affect implementation. | 138 // to. Mostly for informational purposes and doesn't affect implementation. |
| 146 AudioParamType m_paramType; | 139 AudioParamType m_paramType; |
| 147 | 140 |
| 148 // Intrinsic value | 141 // Intrinsic value |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 private: | 180 private: |
| 188 AudioParam(AbstractAudioContext&, AudioParamType, double defaultValue); | 181 AudioParam(AbstractAudioContext&, AudioParamType, double defaultValue); |
| 189 | 182 |
| 190 RefPtr<AudioParamHandler> m_handler; | 183 RefPtr<AudioParamHandler> m_handler; |
| 191 Member<AbstractAudioContext> m_context; | 184 Member<AbstractAudioContext> m_context; |
| 192 }; | 185 }; |
| 193 | 186 |
| 194 } // namespace blink | 187 } // namespace blink |
| 195 | 188 |
| 196 #endif // AudioParam_h | 189 #endif // AudioParam_h |
| OLD | NEW |