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

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

Issue 2389253002: reflow comments in modules/{webaudio,vr} (Closed)
Patch Set: . Created 4 years, 2 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void cancelScheduledValues(double startTime, ExceptionState&); 66 void cancelScheduledValues(double startTime, ExceptionState&);
67 67
68 // hasValue is set to true if a valid timeline value is returned. 68 // hasValue is set to true if a valid timeline value is returned.
69 // otherwise defaultValue is returned. 69 // otherwise defaultValue is returned.
70 float valueForContextTime(AudioDestinationHandler&, 70 float valueForContextTime(AudioDestinationHandler&,
71 float defaultValue, 71 float defaultValue,
72 bool& hasValue, 72 bool& hasValue,
73 float minValue, 73 float minValue,
74 float maxValue); 74 float maxValue);
75 75
76 // Given the time range in frames, calculates parameter values into the values buffer and 76 // Given the time range in frames, calculates parameter values into the values
77 // returns the last parameter value calculated for "values" or the defaultValu e if none were 77 // buffer and returns the last parameter value calculated for "values" or the
78 // calculated. controlRate is the rate (number per second) at which parameter values will be 78 // defaultValue if none were calculated. controlRate is the rate (number per
79 // calculated. It should equal sampleRate for sample-accurate parameter chang es, and otherwise 79 // second) at which parameter values will be calculated. It should equal
80 // will usually match the render quantum size such that the parameter value ch anges once per 80 // sampleRate for sample-accurate parameter changes, and otherwise will
81 // render quantum. 81 // usually match the render quantum size such that the parameter value changes
82 // once per render quantum.
82 float valuesForFrameRange(size_t startFrame, 83 float valuesForFrameRange(size_t startFrame,
83 size_t endFrame, 84 size_t endFrame,
84 float defaultValue, 85 float defaultValue,
85 float* values, 86 float* values,
86 unsigned numberOfValues, 87 unsigned numberOfValues,
87 double sampleRate, 88 double sampleRate,
88 double controlRate, 89 double controlRate,
89 float minValue, 90 float minValue,
90 float maxValue); 91 float maxValue);
91 92
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 double callTime = 0); 144 double callTime = 0);
144 145
145 Type m_type; 146 Type m_type;
146 float m_value; 147 float m_value;
147 double m_time; 148 double m_time;
148 // Only used for SetTarget events 149 // Only used for SetTarget events
149 double m_timeConstant; 150 double m_timeConstant;
150 // Only used for SetValueCurve events. 151 // Only used for SetValueCurve events.
151 double m_duration; 152 double m_duration;
152 Vector<float> m_curve; 153 Vector<float> m_curve;
153 // Initial value and time to use for linear and exponential ramps that don't have a 154 // Initial value and time to use for linear and exponential ramps that don't
154 // preceding event. 155 // have a preceding event.
155 float m_initialValue; 156 float m_initialValue;
156 double m_callTime; 157 double m_callTime;
157 }; 158 };
158 159
159 void insertEvent(const ParamEvent&, ExceptionState&); 160 void insertEvent(const ParamEvent&, ExceptionState&);
160 float valuesForFrameRangeImpl(size_t startFrame, 161 float valuesForFrameRangeImpl(size_t startFrame,
161 size_t endFrame, 162 size_t endFrame,
162 float defaultValue, 163 float defaultValue,
163 float* values, 164 float* values,
164 unsigned numberOfValues, 165 unsigned numberOfValues,
165 double sampleRate, 166 double sampleRate,
166 double controlRate); 167 double controlRate);
167 168
168 // Produce a nice string describing the event in human-readable form. 169 // Produce a nice string describing the event in human-readable form.
169 String eventToString(const ParamEvent&); 170 String eventToString(const ParamEvent&);
170 Vector<ParamEvent> m_events; 171 Vector<ParamEvent> m_events;
171 172
172 mutable Mutex m_eventsLock; 173 mutable Mutex m_eventsLock;
173 174
174 // Smoothing (de-zippering) 175 // Smoothing (de-zippering)
175 float m_smoothedValue; 176 float m_smoothedValue;
176 }; 177 };
177 178
178 } // namespace blink 179 } // namespace blink
179 180
180 #endif // AudioParamTimeline_h 181 #endif // AudioParamTimeline_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698