Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h |
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h |
| index 0c6df89f691751eb2c2da141ee8766d886751a6e..e83db4a2b7fa251e6a6342fcc6031bcaaf62da7f 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h |
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h |
| @@ -168,8 +168,18 @@ class AudioBufferSourceHandler final : public AudioScheduledSourceHandler { |
| // conversion factor, and the value of playbackRate and detune AudioParams. |
| double ComputePlaybackRate(); |
| + double MinPlaybackRate(); |
|
hongchan
2017/06/12 14:09:18
GetMinPlaybackRate() might be better.
|
| + |
| // The minimum playbackRate value ever used for this source. |
| double min_playback_rate_; |
| + |
| + // |min_playback_rate_| may be updated by the audio thread |
| + // while the main thread checks if the node is in a stoppable |
| + // state, hence access needs to be atomic. |
| + // |
| + // TODO: when the codebase adopts std::atomic<>, use it for |
| + // |min_playback_rate_|. |
| + Mutex min_playback_rate_mutex_; |
| }; |
| class AudioBufferSourceNode final : public AudioScheduledSourceNode { |