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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h

Issue 2000423008: Clamp AudioParam automations to the nominal range. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
index fbd6b1ab2431db79f0425e595536a5485e4d437a..2f799a6e35bae8c87c007e51172b31b2018fcc63 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
@@ -54,7 +54,7 @@ public:
// hasValue is set to true if a valid timeline value is returned.
// otherwise defaultValue is returned.
- float valueForContextTime(AudioDestinationHandler&, float defaultValue, bool& hasValue);
+ float valueForContextTime(AudioDestinationHandler&, float defaultValue, bool& hasValue, float minValue, float maxValue);
// Given the time range in frames, calculates parameter values into the values buffer and
// returns the last parameter value calculated for "values" or the defaultValue if none were
@@ -62,7 +62,7 @@ public:
// calculated. It should equal sampleRate for sample-accurate parameter changes, and otherwise
// will usually match the render quantum size such that the parameter value changes once per
// render quantum.
- float valuesForFrameRange(size_t startFrame, size_t endFrame, float defaultValue, float* values, unsigned numberOfValues, double sampleRate, double controlRate);
+ float valuesForFrameRange(size_t startFrame, size_t endFrame, float defaultValue, float* values, unsigned numberOfValues, double sampleRate, double controlRate, float minValue, float maxValue);
// Returns true if this AudioParam has any events on it.
bool hasValues() const;

Powered by Google App Engine
This is Rietveld 408576698