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

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

Issue 2391893005: Implement clamping of AudioParam time. (Closed)
Patch Set: Address review comments 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 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 f163224fca06f3049d5b39b75cd413618ba6ae08..af85e1c7398713b97ab506be16a886ecbb2c432f 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
@@ -127,11 +127,14 @@ class AudioParamTimeline {
Type getType() const { return m_type; }
float value() const { return m_value; }
double time() const { return m_time; }
+ void setTime(double newTime) { m_time = newTime; }
double timeConstant() const { return m_timeConstant; }
double duration() const { return m_duration; }
Vector<float>& curve() { return m_curve; }
float initialValue() const { return m_initialValue; }
double callTime() const { return m_callTime; }
+ bool needsTimeClampCheck() const { return m_needsTimeClampCheck; }
+ void clearTimeClampCheck() { m_needsTimeClampCheck = false; }
private:
ParamEvent(Type type,
@@ -155,6 +158,9 @@ class AudioParamTimeline {
// have a preceding event.
float m_initialValue;
double m_callTime;
+ // True if the start time needs to be checked against current time
+ // to implement clamping.
+ bool m_needsTimeClampCheck;
};
void insertEvent(const ParamEvent&, ExceptionState&);

Powered by Google App Engine
This is Rietveld 408576698