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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp

Issue 2342913003: Replace narrowPrecisionToFloat with clampTo<float> (Closed)
Patch Set: Created 4 years, 3 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "modules/webaudio/AudioParam.h" 26 #include "modules/webaudio/AudioParam.h"
27 27
28 #include "core/dom/ExceptionCode.h" 28 #include "core/dom/ExceptionCode.h"
29 #include "core/inspector/ConsoleMessage.h" 29 #include "core/inspector/ConsoleMessage.h"
30 #include "modules/webaudio/AudioNode.h" 30 #include "modules/webaudio/AudioNode.h"
31 #include "modules/webaudio/AudioNodeOutput.h" 31 #include "modules/webaudio/AudioNodeOutput.h"
32 #include "platform/FloatConversion.h"
33 #include "platform/Histogram.h" 32 #include "platform/Histogram.h"
34 #include "platform/audio/AudioUtilities.h" 33 #include "platform/audio/AudioUtilities.h"
35 #include "wtf/MathExtras.h" 34 #include "wtf/MathExtras.h"
36 35
37 namespace blink { 36 namespace blink {
38 37
39 const double AudioParamHandler::DefaultSmoothingConstant = 0.05; 38 const double AudioParamHandler::DefaultSmoothingConstant = 0.05;
40 const double AudioParamHandler::SnapThreshold = 0.001; 39 const double AudioParamHandler::SnapThreshold = 0.001;
41 40
42 AudioParamHandler::AudioParamHandler(BaseAudioContext& context, AudioParamType p aramType, double defaultValue, float minValue, float maxValue) 41 AudioParamHandler::AudioParamHandler(BaseAudioContext& context, AudioParamType p aramType, double defaultValue, float minValue, float maxValue)
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 497 }
499 498
500 AudioParam* AudioParam::cancelScheduledValues(double startTime, ExceptionState& exceptionState) 499 AudioParam* AudioParam::cancelScheduledValues(double startTime, ExceptionState& exceptionState)
501 { 500 {
502 handler().timeline().cancelScheduledValues(startTime, exceptionState); 501 handler().timeline().cancelScheduledValues(startTime, exceptionState);
503 return this; 502 return this;
504 } 503 }
505 504
506 } // namespace blink 505 } // namespace blink
507 506
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698