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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 static ParamEvent createExponentialRampEvent(float value, double time, f
loat initialValue, double callTime); | 83 static ParamEvent createExponentialRampEvent(float value, double time, f
loat initialValue, double callTime); |
84 static ParamEvent createSetValueEvent(float value, double time); | 84 static ParamEvent createSetValueEvent(float value, double time); |
85 static ParamEvent createSetTargetEvent(float value, double time, double
timeConstant); | 85 static ParamEvent createSetTargetEvent(float value, double time, double
timeConstant); |
86 static ParamEvent createSetValueCurveEvent(DOMFloat32Array* curve, doubl
e time, double duration); | 86 static ParamEvent createSetValueCurveEvent(DOMFloat32Array* curve, doubl
e time, double duration); |
87 | 87 |
88 Type getType() const { return m_type; } | 88 Type getType() const { return m_type; } |
89 float value() const { return m_value; } | 89 float value() const { return m_value; } |
90 double time() const { return m_time; } | 90 double time() const { return m_time; } |
91 double timeConstant() const { return m_timeConstant; } | 91 double timeConstant() const { return m_timeConstant; } |
92 double duration() const { return m_duration; } | 92 double duration() const { return m_duration; } |
93 DOMFloat32Array* curve() { return m_curve.get(); } | 93 CrossThreadPersistent<DOMFloat32Array>& curve() { return m_curve; } |
94 float initialValue() const { return m_initialValue; } | 94 float initialValue() const { return m_initialValue; } |
95 double callTime() const { return m_callTime; } | 95 double callTime() const { return m_callTime; } |
96 | 96 |
97 private: | 97 private: |
98 ParamEvent(Type type, float value, double time, | 98 ParamEvent(Type type, float value, double time, |
99 double timeConstant, double duration, DOMFloat32Array* curve, | 99 double timeConstant, double duration, DOMFloat32Array* curve, |
100 float initialValue = 0, double callTime = 0) | 100 float initialValue = 0, double callTime = 0) |
101 : m_type(type) | 101 : m_type(type) |
102 , m_value(value) | 102 , m_value(value) |
103 , m_time(time) | 103 , m_time(time) |
(...skipping 25 matching lines...) Expand all Loading... |
129 // Produce a nice string describing the event in human-readable form. | 129 // Produce a nice string describing the event in human-readable form. |
130 String eventToString(const ParamEvent&); | 130 String eventToString(const ParamEvent&); |
131 Vector<ParamEvent> m_events; | 131 Vector<ParamEvent> m_events; |
132 | 132 |
133 mutable Mutex m_eventsLock; | 133 mutable Mutex m_eventsLock; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace blink | 136 } // namespace blink |
137 | 137 |
138 #endif // AudioParamTimeline_h | 138 #endif // AudioParamTimeline_h |
OLD | NEW |