Chromium Code Reviews| 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..bd320153e69dfe804ce6ca835a4f341ff5af27ae 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* context() const; |
|
tkent
2016/04/25 23:10:09
Maybe we'd like to rename the function.
Raymond Toy
2016/04/26 16:37:41
Renamed to audioDestination().
|
| // AudioSummingJunction |
| void didUpdate() override { } |
| @@ -107,7 +107,8 @@ private: |
| , m_intrinsicValue(defaultValue) |
| , m_defaultValue(defaultValue) |
| , m_smoothedValue(defaultValue) |
| - , m_context(&context) { } |
| + , m_destination(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. |
| + AudioDestinationHandler& m_destination; |
|
tkent
2016/04/25 23:10:09
Is it safe to hold a raw reference of AudioDestina
Raymond Toy
2016/04/26 16:37:41
Done.
|
| }; |
| // AudioParam class represents web-exposed AudioParam interface. |