Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h

Issue 2623563002: Sort event list if any event time was clamped (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 float initialValue, 117 float initialValue,
118 double callTime); 118 double callTime);
119 static ParamEvent createSetValueEvent(float value, double time); 119 static ParamEvent createSetValueEvent(float value, double time);
120 static ParamEvent createSetTargetEvent(float value, 120 static ParamEvent createSetTargetEvent(float value,
121 double time, 121 double time,
122 double timeConstant); 122 double timeConstant);
123 static ParamEvent createSetValueCurveEvent(const DOMFloat32Array* curve, 123 static ParamEvent createSetValueCurveEvent(const DOMFloat32Array* curve,
124 double time, 124 double time,
125 double duration); 125 double duration);
126 126
127 static bool eventPreceeds(const ParamEvent& a, const ParamEvent& b) {
128 return a.time() < b.time();
129 }
130
127 Type getType() const { return m_type; } 131 Type getType() const { return m_type; }
128 float value() const { return m_value; } 132 float value() const { return m_value; }
129 double time() const { return m_time; } 133 double time() const { return m_time; }
130 void setTime(double newTime) { m_time = newTime; } 134 void setTime(double newTime) { m_time = newTime; }
131 double timeConstant() const { return m_timeConstant; } 135 double timeConstant() const { return m_timeConstant; }
132 double duration() const { return m_duration; } 136 double duration() const { return m_duration; }
133 Vector<float>& curve() { return m_curve; } 137 Vector<float>& curve() { return m_curve; }
134 float initialValue() const { return m_initialValue; } 138 float initialValue() const { return m_initialValue; }
135 double callTime() const { return m_callTime; } 139 double callTime() const { return m_callTime; }
136 bool needsTimeClampCheck() const { return m_needsTimeClampCheck; } 140 bool needsTimeClampCheck() const { return m_needsTimeClampCheck; }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 182
179 mutable Mutex m_eventsLock; 183 mutable Mutex m_eventsLock;
180 184
181 // Smoothing (de-zippering) 185 // Smoothing (de-zippering)
182 float m_smoothedValue; 186 float m_smoothedValue;
183 }; 187 };
184 188
185 } // namespace blink 189 } // namespace blink
186 190
187 #endif // AudioParamTimeline_h 191 #endif // AudioParamTimeline_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698