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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 insertEvent(ParamEvent::createExponentialRampEvent(value, time), exceptionSt
ate); | 174 insertEvent(ParamEvent::createExponentialRampEvent(value, time), exceptionSt
ate); |
175 } | 175 } |
176 | 176 |
177 void AudioParamTimeline::setTargetAtTime(float target, double time, double timeC
onstant, ExceptionState& exceptionState) | 177 void AudioParamTimeline::setTargetAtTime(float target, double time, double timeC
onstant, ExceptionState& exceptionState) |
178 { | 178 { |
179 ASSERT(isMainThread()); | 179 ASSERT(isMainThread()); |
180 | 180 |
181 if (!isNonNegativeAudioParamTime(time, exceptionState) | 181 if (!isNonNegativeAudioParamTime(time, exceptionState) |
182 || !isNonNegativeAudioParamTime(timeConstant, exceptionState, "Time cons
tant")) | 182 || !isPositiveAudioParamTime(timeConstant, exceptionState, "Time constan
t")) |
183 return; | 183 return; |
184 | 184 |
185 insertEvent(ParamEvent::createSetTargetEvent(target, time, timeConstant), ex
ceptionState); | 185 insertEvent(ParamEvent::createSetTargetEvent(target, time, timeConstant), ex
ceptionState); |
186 } | 186 } |
187 | 187 |
188 void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve, double time
, double duration, ExceptionState& exceptionState) | 188 void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve, double time
, double duration, ExceptionState& exceptionState) |
189 { | 189 { |
190 ASSERT(isMainThread()); | 190 ASSERT(isMainThread()); |
191 ASSERT(curve); | 191 ASSERT(curve); |
192 | 192 |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 for (; writeIndex < numberOfValues; ++writeIndex) | 806 for (; writeIndex < numberOfValues; ++writeIndex) |
807 values[writeIndex] = value; | 807 values[writeIndex] = value; |
808 | 808 |
809 // This value is used to set the .value attribute of the AudioParam. it sho
uld be the last | 809 // This value is used to set the .value attribute of the AudioParam. it sho
uld be the last |
810 // computed value. | 810 // computed value. |
811 return values[numberOfValues - 1]; | 811 return values[numberOfValues - 1]; |
812 } | 812 } |
813 | 813 |
814 } // namespace blink | 814 } // namespace blink |
815 | 815 |
OLD | NEW |