| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ExceptionState&); | 54 ExceptionState&); |
| 55 void ExponentialRampToValueAtTime(float value, | 55 void ExponentialRampToValueAtTime(float value, |
| 56 double time, | 56 double time, |
| 57 float initial_value, | 57 float initial_value, |
| 58 double call_time, | 58 double call_time, |
| 59 ExceptionState&); | 59 ExceptionState&); |
| 60 void SetTargetAtTime(float target, | 60 void SetTargetAtTime(float target, |
| 61 double time, | 61 double time, |
| 62 double time_constant, | 62 double time_constant, |
| 63 ExceptionState&); | 63 ExceptionState&); |
| 64 void SetValueCurveAtTime(DOMFloat32Array* curve, | 64 void SetValueCurveAtTime(const Vector<float>& curve, |
| 65 double time, | 65 double time, |
| 66 double duration, | 66 double duration, |
| 67 ExceptionState&); | 67 ExceptionState&); |
| 68 void CancelScheduledValues(double start_time, ExceptionState&); | 68 void CancelScheduledValues(double start_time, ExceptionState&); |
| 69 void CancelAndHoldAtTime(double cancel_time, ExceptionState&); | 69 void CancelAndHoldAtTime(double cancel_time, ExceptionState&); |
| 70 | 70 |
| 71 // hasValue is set to true if a valid timeline value is returned. | 71 // hasValue is set to true if a valid timeline value is returned. |
| 72 // otherwise defaultValue is returned. | 72 // otherwise defaultValue is returned. |
| 73 float ValueForContextTime(AudioDestinationHandler&, | 73 float ValueForContextTime(AudioDestinationHandler&, |
| 74 float default_value, | 74 float default_value, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 static std::unique_ptr<ParamEvent> CreateExponentialRampEvent( | 121 static std::unique_ptr<ParamEvent> CreateExponentialRampEvent( |
| 122 float value, | 122 float value, |
| 123 double time, | 123 double time, |
| 124 float initial_value, | 124 float initial_value, |
| 125 double call_time); | 125 double call_time); |
| 126 static std::unique_ptr<ParamEvent> CreateSetValueEvent(float value, | 126 static std::unique_ptr<ParamEvent> CreateSetValueEvent(float value, |
| 127 double time); | 127 double time); |
| 128 static std::unique_ptr<ParamEvent> | 128 static std::unique_ptr<ParamEvent> |
| 129 CreateSetTargetEvent(float value, double time, double time_constant); | 129 CreateSetTargetEvent(float value, double time, double time_constant); |
| 130 static std::unique_ptr<ParamEvent> CreateSetValueCurveEvent( | 130 static std::unique_ptr<ParamEvent> CreateSetValueCurveEvent( |
| 131 const DOMFloat32Array* curve, | 131 const Vector<float>& curve, |
| 132 double time, | 132 double time, |
| 133 double duration); | 133 double duration); |
| 134 static std::unique_ptr<ParamEvent> CreateCancelValuesEvent( | 134 static std::unique_ptr<ParamEvent> CreateCancelValuesEvent( |
| 135 double time, | 135 double time, |
| 136 std::unique_ptr<ParamEvent> saved_event); | 136 std::unique_ptr<ParamEvent> saved_event); |
| 137 // Needed for creating a saved event where we want to supply all | 137 // Needed for creating a saved event where we want to supply all |
| 138 // the possible parameters because we're mostly copying an | 138 // the possible parameters because we're mostly copying an |
| 139 // existing event. | 139 // existing event. |
| 140 static std::unique_ptr<ParamEvent> CreateGeneralEvent( | 140 static std::unique_ptr<ParamEvent> CreateGeneralEvent( |
| 141 Type, | 141 Type, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 float initial_value, | 203 float initial_value, |
| 204 double call_time); | 204 double call_time); |
| 205 | 205 |
| 206 // Create an event needing a time constant (setTargetAtTime) | 206 // Create an event needing a time constant (setTargetAtTime) |
| 207 ParamEvent(Type, float value, double time, double time_constant); | 207 ParamEvent(Type, float value, double time, double time_constant); |
| 208 | 208 |
| 209 // Create a setValueCurve event | 209 // Create a setValueCurve event |
| 210 ParamEvent(Type, | 210 ParamEvent(Type, |
| 211 double time, | 211 double time, |
| 212 double duration, | 212 double duration, |
| 213 const DOMFloat32Array* curve, | 213 const Vector<float>& curve, |
| 214 double curve_points_per_second, | 214 double curve_points_per_second, |
| 215 float curve_end_value); | 215 float curve_end_value); |
| 216 | 216 |
| 217 // Create CancelValues event | 217 // Create CancelValues event |
| 218 ParamEvent(Type, double time, std::unique_ptr<ParamEvent> saved_event); | 218 ParamEvent(Type, double time, std::unique_ptr<ParamEvent> saved_event); |
| 219 | 219 |
| 220 Type type_; | 220 Type type_; |
| 221 | 221 |
| 222 // The value for the event. The interpretation of this depends on | 222 // The value for the event. The interpretation of this depends on |
| 223 // the event type. Not used for SetValueCurve. For CancelValues, | 223 // the event type. Not used for SetValueCurve. For CancelValues, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 mutable Mutex events_lock_; | 451 mutable Mutex events_lock_; |
| 452 | 452 |
| 453 // Smoothing (de-zippering) | 453 // Smoothing (de-zippering) |
| 454 float smoothed_value_; | 454 float smoothed_value_; |
| 455 }; | 455 }; |
| 456 | 456 |
| 457 } // namespace blink | 457 } // namespace blink |
| 458 | 458 |
| 459 #endif // AudioParamTimeline_h | 459 #endif // AudioParamTimeline_h |
| OLD | NEW |