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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 if (!isNonNegativeAudioParamTime(time, exceptionState) | 194 if (!isNonNegativeAudioParamTime(time, exceptionState) |
195 || !isNonNegativeAudioParamTime(timeConstant, exceptionState, "Time cons tant")) | 195 || !isNonNegativeAudioParamTime(timeConstant, exceptionState, "Time cons tant")) |
196 return; | 196 return; |
197 | 197 |
198 insertEvent(ParamEvent::createSetTargetEvent(target, time, timeConstant), ex ceptionState); | 198 insertEvent(ParamEvent::createSetTargetEvent(target, time, timeConstant), ex ceptionState); |
199 } | 199 } |
200 | 200 |
201 void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve, double time , double duration, ExceptionState& exceptionState) | 201 void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve, double time , double duration, ExceptionState& exceptionState) |
202 { | 202 { |
203 ASSERT(isMainThread()); | 203 ASSERT(isMainThread()); |
204 ASSERT(curve); | |
Raymond Toy
2015/12/04 17:30:42
In a release build, what should we do if curve is
philipj_slow
2015/12/04 18:31:57
Would you like me to revert all changes to cpp fil
Raymond Toy
2015/12/04 21:06:26
Thanks for the info. I think this is fine, plus y
| |
204 | 205 |
205 if (!isNonNegativeAudioParamTime(time, exceptionState) | 206 if (!isNonNegativeAudioParamTime(time, exceptionState) |
206 || !isPositiveAudioParamTime(duration, exceptionState, "Duration")) | 207 || !isPositiveAudioParamTime(duration, exceptionState, "Duration")) |
207 return; | 208 return; |
208 | 209 |
209 insertEvent(ParamEvent::createSetValueCurveEvent(curve, time, duration), exc eptionState); | 210 insertEvent(ParamEvent::createSetValueCurveEvent(curve, time, duration), exc eptionState); |
210 } | 211 } |
211 | 212 |
212 void AudioParamTimeline::insertEvent(const ParamEvent& event, ExceptionState& ex ceptionState) | 213 void AudioParamTimeline::insertEvent(const ParamEvent& event, ExceptionState& ex ceptionState) |
213 { | 214 { |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
756 // to the end of the values buffer. | 757 // to the end of the values buffer. |
757 for (; writeIndex < numberOfValues; ++writeIndex) | 758 for (; writeIndex < numberOfValues; ++writeIndex) |
758 values[writeIndex] = value; | 759 values[writeIndex] = value; |
759 | 760 |
760 return value; | 761 return value; |
761 } | 762 } |
762 | 763 |
763 } // namespace blink | 764 } // namespace blink |
764 | 765 |
765 #endif // ENABLE(WEB_AUDIO) | 766 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |