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

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

Issue 1037683002: Web Audio: Unapply Oilpan to AudioSummingJunction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove m_didCallDispose Created 5 years, 9 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 | « Source/modules/webaudio/AudioNodeInput.cpp ('k') | Source/modules/webaudio/AudioParam.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioParam.h
diff --git a/Source/modules/webaudio/AudioParam.h b/Source/modules/webaudio/AudioParam.h
index d278d57cde6853c9b44916a5fdb9f9d12f520c75..32b67be7de2bd3bce2d187ab635cd29fa121a085 100644
--- a/Source/modules/webaudio/AudioParam.h
+++ b/Source/modules/webaudio/AudioParam.h
@@ -42,7 +42,7 @@ namespace blink {
class AudioNodeOutput;
-class AudioParamHandler final : public AudioSummingJunction, public ScriptWrappable {
+class AudioParamHandler final : public GarbageCollectedFinalized<AudioParamHandler>, public AudioSummingJunction, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static const double DefaultSmoothingConstant;
@@ -52,6 +52,8 @@ public:
{
return new AudioParamHandler(context, defaultValue);
}
+ DECLARE_TRACE();
+ AudioContext* context() const { return m_context; }
// AudioSummingJunction
virtual void didUpdate() override { }
@@ -116,10 +118,11 @@ public:
private:
AudioParamHandler(AudioContext* context, double defaultValue)
- : AudioSummingJunction(context)
+ : AudioSummingJunction(context->handler())
, m_value(defaultValue)
, m_defaultValue(defaultValue)
- , m_smoothedValue(defaultValue) { }
+ , m_smoothedValue(defaultValue)
+ , m_context(context) { }
// sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web Audio specification.
void calculateFinalValues(float* values, unsigned numberOfValues, bool sampleAccurate);
@@ -132,6 +135,7 @@ private:
double m_smoothedValue;
AudioParamTimeline m_timeline;
+ Member<AudioContext> m_context;
};
// TODO(tkent): remove the type alias, and introduce a real AudioParam class to
« no previous file with comments | « Source/modules/webaudio/AudioNodeInput.cpp ('k') | Source/modules/webaudio/AudioParam.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698