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

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

Issue 1911133002: Remove connection from AudioParamHandler to AudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and Rename Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParam.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioParam.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.h b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
index 496fd96706e220714fe210002599f282add54468..ca19b338b1091abac85586456c6d1638ab53e32a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
@@ -61,7 +61,7 @@ public:
}
// This should be used only in audio rendering thread.
- AbstractAudioContext* context() const;
+ AudioDestinationHandler& destinationHandler() const;
// AudioSummingJunction
void didUpdate() override { }
@@ -107,7 +107,8 @@ private:
, m_intrinsicValue(defaultValue)
, m_defaultValue(defaultValue)
, m_smoothedValue(defaultValue)
- , m_context(&context) { }
+ , m_destinationHandler(context.destination()->audioDestinationHandler())
+ { }
// sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web Audio specification.
void calculateFinalValues(float* values, unsigned numberOfValues, bool sampleAccurate);
@@ -124,9 +125,8 @@ private:
AudioParamTimeline m_timeline;
- // We can't make this Persistent because of a reference cycle. It's safe to
- // access this field only when we're rendering audio.
- UntracedMember<AbstractAudioContext> m_context;
+ // The destination node used to get necessary information like the smaple rate and context time.
+ RefPtr<AudioDestinationHandler> m_destinationHandler;
};
// AudioParam class represents web-exposed AudioParam interface.
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioParam.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698